TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
韩天峰 41e11a66e6 refactor(build): update runtime initialization and linking for native modules 4 days ago
..
cpp-src refactor(build): update runtime initialization and linking for native modules 4 days ago
gdextension-src feat(ocean): add ocean demo with Godot integration 2 months ago
php-src feat(ocean): add ocean demo with Godot integration 2 months ago
scenes feat(ocean): add ocean demo with Godot integration 2 months ago
scripts feat(ocean): add ocean demo with Godot integration 2 months ago
2.jpg feat(ocean): add ocean demo with Godot integration 2 months ago
README.md feat(ocean): add ocean demo with Godot integration 2 months ago
project.godot feat(ocean): add ocean demo with Godot integration 2 months ago
typephp.yml feat(ocean): add ocean demo with Godot integration 2 months ago
typephp_ocean_bridge.gdextension feat(ocean): add ocean demo with Godot integration 2 months ago

README.md

TypePHP Ocean Odyssey

Godot + TypePHP open ocean demo with procedural ocean, sky, clouds, rain, islands, navigation markers, and a controllable sailboat.

Godot owns rendering, input, camera, weather presentation, and procedural meshes. TypePHP owns deterministic world data and weather transitions once the bridge DLL is built. The Godot scene still runs with fallback data if the native bridge is not present.

Run in Godot

D:\workspace\godot\Godot_v4.7-stable_win64_console.exe --path examples\ocean-godot

Controls:

  • W/A/S/D sail relative to the camera
  • Shift boost
  • Mouse to orbit the camera
  • Esc release or capture the mouse

Build TypePHP library

php bin\compiler.php examples\ocean-godot\typephp.yml -f
Copy-Item -LiteralPath typephp_ocean.dll -Destination examples\ocean-godot\bin\typephp_ocean.dll -Force

Build Godot GDExtension

cmake -S examples\ocean-godot\gdextension-src -B examples\ocean-godot\gdextension-src\build-nmake -G "NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=D:\workspace\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Release
cmake --build examples\ocean-godot\gdextension-src\build-nmake --config Release

The bridge outputs:

examples\ocean-godot\bin\typephp_ocean_godot_bridge.dll