Homebrew 4D Game Engine In Rust, inspired by Engine4D

feat(demo): Wave 5 Lua demo game — scripted 4D gallery + trigger + HUD + audio

Ship games/demo/: a real game directory the engine loads with no compiled game code, exercising the full Wave 5 scripting surface. Scene (games/demo/scenes/demo.ron): floor + six gallery primitives in a ring (tesseract, pentachoron, hexadecachoron, icositetrachoron, spherinder, duocylinder), each named + tagged ["gallery"], plus a central semi-transparent "trigger_zone" hypersphere and a player_spawn facing the ring. Lua scripts: - main.lua: on_init finds entities by name and builds rotators + the trigger zone + loads audio cues; on_update drives rotation, the pulse, the HUD, and the W-slide input indicator; on_fixed_update runs the trigger AABB tick; on_shutdown logs. Exposes gallery_count/trigger_enters/trigger_exits globals. - scripts/rotator.lua: per-entity 4D spin in W-involving bivector planes (XW/YW/ZW) so the 3D slice morphs, written back via entity:set("transform"). - scripts/trigger_zone.lua: 4D AABB enter/exit state machine + manual sine scale-pulse (TweenManager is not Lua-bound). - scripts/hud.lua: per-frame readout via hud.text/progress_bar/flash/screen_size. Audio: two tiny synthesized WAV cues (assets/blip.wav 15 KB, assets/tone.wav 20 KB) generated by assets/generate_cues.py (stdlib only). Played spatially at the zone; degrades to silent + logged when no audio device is available. Headless smoke (examples/demo_smoke.rs): loads the real scene + scripts and drives the Lua lifecycle against the live hecs::World, asserting 6 rotators are created, geometry is marked dirty, the tesseract rotation advances, and the trigger fires. Passes. Docs: games/demo/README.md (run + feature matrix + engine limitations), CHANGELOG Wave 5 entries, developer-guide demo run command fix, README quickstart demo command. Run: R4D_SCENE__PATH=games/demo/scenes/demo.ron cargo run -- --game games/demo Smoke: cargo run --example demo_smoke Quality gate: cargo test --workspace (slice_invariant 6/6, lua_ecs_bridge 4/4, 0 failures), clippy --workspace --all-targets -D warnings clean, fmt clean, demo_smoke PASS. Engine limitations worked around (documented in the report + demo README): no player-position binding (uses audio.get_listener_position as proxy), HUD bindings are render-stubs, TweenManager not Lua-bound, no slice-offset binding, scene path independent of --game.


Author sigilzero.dev
Date Commit Parent c47e5fec