nx_game_world.nx
buildroot/runtime/nx_game_world.nx
about
nx_game_world.nx -- the sovereign GAME WORLD layer: procedural terrain + entity geometry, both emitted
PLAYER-RELATIVE straight into the nx_swgpu vertex/triangle arrays. Extracted from nx_gx4_walk_gate the
moment a second gate needed the same world (migrate-on-touch, so there is never a second copy to drift --
the dual-source hazard this ecosystem has paid for before). Behaviour-preserving by construction: the walk
gate's determinism checksum must stay bit-identical across the extraction, which is how the refactor is
PROVEN clean rather than assumed. license_tier: ORIGINAL
dependencies 1 imports · 3 importers
imports: nx_swgpu.nx
imported by: nx_gx4_walk_gate.nxnx_gx7_game_gate.nxnx_gx9_saveload_gate.nx
structs
| none |
consts
| 8 | const GW_MAGIC_15000: i64 = 15000 |
| 9 | const GW_MAGIC_4096: i64 = 4096 |
| 10 | const GW_MAGIC_2500: i64 = 2500 |
| 11 | const GW_MAGIC_4200: i64 = 4200 |
| 12 | const GW_MAGIC_1200: i64 = 1200 |
| 14 | const GW_N: i64 = 28 // terrain grid cells per side -> (N+1)^2 verts |
| 15 | const GW_CELL: i64 = 4096 // 1.0 world unit per cell (fx4096) |
functions
| 19 | func gw_h(i: i64, j: i64) -> i64 |
| 30 | func gw_band(i: i64, j: i64) -> i64 |
| 41 | func gw_ground(wx: i64, wz: i64) -> i64 |
| 54 | func gw_build_terrain(base: i64, band: i64, ppx: i64, ppz: i64, eyey: i64) -> i64 |
| 115 | func gw_build_entities(base: i64, ex: *i64, ez: *i64, alive: *i64, n: i64, ppx: i64, ppz: i64, eyey: i64, r: i64, lift: i64) -> i64 |
| 166 | func gw_dist2(ax: i64, az: i64, bx: i64, bz: i64) -> i64 |