code wiki / _hdl_build / nx_game_scaffold.nx
nx_game_scaffold.nx
buildroot/runtime/_hdl_build/nx_game_scaffold.nx
about
nx_game_scaffold.nx -- LIB: the SCAFFOLD that ties the universal Nishi-builder catalog (the parts SSOT) to the
game ecosystem, HARDWARE-RUNG-UP, each rung building on the one below, up to AUTOGENERATION. The rungs:
R0 catalog SSOT (nb_*) -> R1 parts (mechanic/entity/level/tilemap emitters) -> R2 COMPOSE (pick parts)
-> R3 VALIDATE (all parts resolve, sovereign-safe) -> R4 RUN (ng_sim_run = the deterministic runtime)
-> R5 RASTER (integer, NO FLOAT, packed-RGB framebuffer -> PNG, the ecosystem's sovereign visual standard)
-> R6 AUTOGENERATE (procedurally synthesize NEW playable levels into the catalog, each verified by the runtime).
This is the platformer genre rung of project-nishi-game-ecosystem-generative, sourced from the ONE universal
catalog. Sovereign: NO float (decimals already milli-fixed in nx_game_render), NO JS, NO 3rd-party draw -- the
raster is pure-Nishi integer pixels (reuses nx_shade + nx_png, the same chain the arcade/2048 rungs ship through).
license_tier: ORIGINAL
dependencies 6 imports · 1 importers
imports: nx_game_render.nxnx_nishi_builder.nxnx_shade.nxnx_png.nxnx_ad_serve.nxnx_syscalls.nx
imported by: nx_game_scaffold_gate.nx
structs
| none |
consts
| 17 | const K_MAGIC_1103515245: i64 = 1103515245 |
| 18 | const K_MAGIC_12345: i64 = 12345 |
| 19 | const K_MAGIC_32767: i64 = 32767 |
functions
| 22 | func gs_rng(seedbox: *i64) -> i64 { var x: i64 = seedbox[0]; x = x * K_MAGIC_1103515245 + K_MAGIC_12345; seedbox[0] = x; return (x >> 16) & K_MAGIC_32767 } called by 1: gs_autogen_one |
| 25 | func gs_fill(fb: *i64, w: i64, h: i64, x0: i64, y0: i64, x1: i64, y1: i64, c: i64) -> i64 called by 1: gs_raster |
| 39 | func gs_raster(st: *i64, fb: *i64, w: i64, h: i64, cell: i64) -> i64 |
| 59 | func gs_autogen_one(path: *u8, seedbox: *i64, idx: i64, mech: *u8, tilemap: *u8, foe: *u8, st: *i64, out_c: *i64, out_f: *i64) -> i64 |