code wiki / _hdl_build / nx_game_render.nx
nx_game_render.nx
buildroot/runtime/_hdl_build/nx_game_render.nx
about
nx_game_render.nx -- LIB: the GAME domain CONSUMER for the Nishi builder. Resolves game emitters from the
universal catalog by id (level/mechanic/entity/tilemap) and RUNS them as a deterministic, sovereign
spec->runtime simulation -- no LLM at runtime, no JS, no external fetch. Closes the game loop the same way
nx_web_render closes web: build -> teach -> grow -> CONSUME. Growing the catalog grows what plays, no code change.
The seeded game specs describe a 2D platformer, so the runtime is a faithful deterministic auto-runner over a
1-D track derived from the level spec: the hero traverses, collecting every coin and clearing every patroller
the level declares, jumping with the mechanic's physics, and reaching the exit. Every observable (coins, foes,
damage, jump apex, exit tick) is a pure function of the catalog DATA -- so the gate's asserts prove the spec
actually drives the run, not a hardcode. Integer-only (NishiLang has no floats): decimals like gravity=0.6 are
parsed to milli fixed-point (x1000). license_tier: ORIGINAL
dependencies 3 imports · 4 importers
imports: nx_nishi_builder.nxnx_ad_serve.nxnx_syscalls.nx
imported by: nx_game_grow.nxnx_game_render_gate.nxnx_game_scaffold.nxnx_game_scaffold_gate.nx
structs
| none |
consts
| none |
functions
| 17 | func ng_keyeq(spec: *u8, i: i64, key: *u8) -> i64 called by 1: ng_kv |
| 24 | func ng_kv(spec: *u8, key: *u8, out: *u8, cap: i64) -> i64 |
| 42 | func ng_int_of(s: *u8) -> i64 |
| 48 | func ng_fixed(s: *u8) -> i64 called by 1: ng_sim_run |
| 63 | func ng_field(spec: *u8, idx: i64, out: *u8) -> i64 called by 1: ng_sim_run |
| 72 | func ng_token_count(spec: *u8, name: *u8) -> i64 |
| 90 | func ng_jump_apex(impulse_milli: i64, gravity_milli: i64) -> i64 called by 1: ng_sim_run |
| 99 | func ng_num(buf: *u8, off: i64, v: i64) -> i64 |
| 115 | func ng_sim_run(path: *u8, level_id: *u8, mech_id: *u8, ent_id: *u8, st: *i64) -> i64 called by 4: mainmaings_autogen_onemain calls 8: sys_mmapnb_lookupng_token_countng_fieldng_kvng_fixed+2 |
| 158 | func ng_transcript(st: *i64, level_id: *u8, buf: *u8) -> i64 |