code wiki / (root) / nx_worldgrade.nx

nx_worldgrade.nx

buildroot/runtime/nx_worldgrade.nx

7896 B142 linesdepth 6pulls 33 transitivereach 0 importersview sourcekind orphan library
docsdependenciesstructsconstsfunctions

about

nx_worldgrade.nx -- THE MISSING CONSUMER: grade a LIVE ENGINE WORLD with the 8-axis referee. nx_world_quality_grader.nx has existed since 2026-05-16 and had never graded anything, because every one of its five declared consumers (nx_procgen_biome_test, nx_procgen_water_test, nx_procgen_features_test, nx_procgen_signature_test, nx_layer_verdict) is SOURCE-ONLY and its own main() is a SELF-TEST over synthetic fixtures. A grader whose only caller is its own unit test has measured nothing about the product. This organ is the caller: it boots nx_wasm_craft's real world generator at a recipe's (identity, seed), reads the terrain the engine ACTUALLY BUILT, and hands that heightmap to the referee. THE SUBJECT IS THE REALISED VOXEL WORLD, NOT THE NOISE FUNCTION. wground(base,x,z) walks the column down from WY-1 and returns the first solid block, so it sees erosion, the shore ramp, structures and every gen-time row the engine applied -- whereas wheight() is the pre-build surface estimate. Those are two different subjects and only one of them is what a player sees. SCOPE, STATED SO IT CANNOT BE OVER-READ: * The FEATURE-VARIETY axis abstains (no feature histogram is supplied), so it scores 0 and can only LOWER the grade. THE REPORTED GRADE IS THEREFORE A FLOOR, not a value -- it can rise when a feature histogram is wired and can never fall for that reason. Announced in the output as feature_hist=ABSENT so no reader can mistake the floor for the verdict. * The BIOME map is the world's OWN surface block id at each column, read from the voxels. It is not a labelling this organ invented, which is the whole point: a biome map derived here from elevation would be graded against elevation and score well by construction -- a ruler measuring its own reflection. * gen-time recipe rows (world_recipes.conf column 7) are NOT applied. Every world whose row has no spec column -- craft, beach, isle -- is therefore graded exactly as it ships. A world that carries spec pairs (crags, ridge) would be graded as its BARE IDENTITY, so the output says spec=NONE-APPLIED rather than letting the wrong subject pass as the right one. license_tier: ORIGINAL No hw writes (Rule 26). usage: nx_worldgrade <vnum> [seed] exit: 0 graded | 2 usage

dependencies 2 imports · 0 importers

nx_wasm_craft.nx nx_world_quality_grader.nx nx_worldgrade.nx

imports: nx_wasm_craft.nxnx_world_quality_grader.nx

imported by: nobody (leaf or entry point)

structs

none

consts

37const WG3_SEED_DEFAULT: i64 = 20260728
39const WG3_ARENA_PAD: i64 = 4096
40const WG3_ASCII_ZERO: i64 = 48
41const WG3_DEC: i64 = 10
42const WG3_ITOA_CAP: i64 = 32

functions

44func wg3_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
45func wg3_puts(s: *u8) -> i64 { sys_write(1, s, wg3_slen(s)); return 0 }
46func wg3_pn(v: i64) -> i64
59func wg3_int(s: *u8) -> i64
70func wg3_letter(g: i64) -> i64
81func main(argc: i64, argv: *i64) -> i64