code wiki / _hdl_build / nx_game_render.nx

nx_game_render.nx

buildroot/runtime/_hdl_build/nx_game_render.nx

9950 B176 linesdepth 3pulls 4 transitivereach 4 importersview sourcekind librarytopic game
docsdependenciesstructsconstsfunctions

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

nx_nishi_builder.nx nx_ad_serve.nx nx_syscalls.nx nx_game_render.nx nx_game_grow.nx nx_game_render_gate.nx nx_game_scaffold.nx nx_game_scaffold_gate.nx

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

17func ng_keyeq(spec: *u8, i: i64, key: *u8) -> i64
called by 1: ng_kv
24func ng_kv(spec: *u8, key: *u8, out: *u8, cap: i64) -> i64
called by 1: ng_sim_run calls 1: ng_keyeq
42func ng_int_of(s: *u8) -> i64
48func ng_fixed(s: *u8) -> i64
called by 1: ng_sim_run
63func ng_field(spec: *u8, idx: i64, out: *u8) -> i64
called by 1: ng_sim_run
72func ng_token_count(spec: *u8, name: *u8) -> i64
called by 1: ng_sim_run calls 1: ng_int_of
90func ng_jump_apex(impulse_milli: i64, gravity_milli: i64) -> i64
called by 1: ng_sim_run
99func ng_num(buf: *u8, off: i64, v: i64) -> i64
115func ng_sim_run(path: *u8, level_id: *u8, mech_id: *u8, ent_id: *u8, st: *i64) -> i64
158func ng_transcript(st: *i64, level_id: *u8, buf: *u8) -> i64
called by 2: mainmain calls 2: as_appendng_num