code wiki / (root) / nx_beach_contact_before_placement_t316.nx

nx_beach_contact_before_placement_t316.nx

buildroot/runtime/nx_beach_contact_before_placement_t316.nx

30533 B775 linesdepth 6pulls 33 transitivereach 0 importersview sourcekind tooltopic beach
docsdependenciesstructsconstsfunctions

about

nx_beach_contact_gate.nx -- BEACH GROUND CONTACT: every body path that can leave feet under the rendered sand has a tooth, and each tooth prints the numbers it judged (2026-09-11 beach lane). Causes held here, from the 2026-09-11 fall-through diagnosis: rank 1 collision floor versus the rendered field; rank 2 block-sized camera pops while walking; rank 3 an NPC buried by a window shift and never walked out; rank 4 player support with feet under the field, and the stale-spawn respawn that reaches it; rank 5 an NPC push across a rise; rank 6 arrivals placed on overhead structures. Also a large-dt fall (15 fixed ticks per 250 ms frame from the window top) and NPCs held at both window corners. A checker the current engine cannot fail is paired with a neg-control that runs the SAME checker over the served rule on the same data, so a checker that cannot fire is visible. Native world and fixtures only; browser visual acceptance stays with the operator. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_craft_before_placement_t316.nx nx_gate_verdict.nx nx_dec_emit.nx nx_beach_contact_before_placem

imports: nx_craft_before_placement_t316.nxnx_gate_verdict.nxnx_dec_emit.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ bcg_checks wsp vset vin wvx hq_set wc_surface_source hq_get wstand_here wc_contact_floor_below_q wsp ↻ wc_surface_source ↻ vget vin ↻ wvx ↻ vsolid vget ↻ wterrain wst wsp ↻ vget ↻ wc_contact_floor_q wc_contact_floor_below_q ↻

structs

none

consts

16const BCG_BLOCK_Q8: i64 = 256 // one block in Q8 world units (the engine's S_CX: 256 = one block)
17const BCG_BODY_CELLS: i64 = 2 // the two body cells mob_fits proves above a floor
18const BCG_CLAMP_BLOCKS: i64 = 2 // wc_shift's window clamp margin in blocks
19const BCG_STRUCTURE: i64 = 6 // a non-terrain solid; the legacy teeth plant the same block
20const BCG_FLAT_HQ: i64 = 1152 // the legacy teeth's flat field corner height
21const BCG_FIX_COL: i64 = 10 // the legacy teeth's fixture column
22const BCG_PATCH_REACH: i64 = 4 // half-width in blocks of a rewritten fixture field
23const BCG_WALK_TICKS: i64 = 240 // four seconds of the page's 60 Hz fixed tick per heading
24const BCG_HEADINGS: i64 = 4 // +x, -x, +z, -z
25const BCG_EDGE_BLOCKS: i64 = 4 // walks stop this far from the window edge; the shift has its own tooth
26const BCG_BURY_BLOCKS: i64 = 2 // the diagnosed burial depth the NPC rise limit never climbs
27const BCG_SHIFT_MAX: i64 = 8 // window slides allowed before the spawn must reach the clamp
28const BCG_SETTLE_TICKS: i64 = 60 // one second of fixed ticks after a placement, push or respawn
29const BCG_EDGE_TICKS: i64 = 240 // ticks the corner NPCs are observed
30const BCG_PAGE_DT_MS: i64 = 250 // the page's NXFRAME_OOR_MS frame clamp
31const BCG_TICK_US: i64 = 16667 // the page accumulator's 16.6667 ms fixed tick
32const BCG_MS_US: i64 = 1000
33const BCG_FALL_TICKS: i64 = 900 // fifteen seconds; a fall from the window top lands long before
34const BCG_PROBES: i64 = 6 // depths under the field probed by the support tooth
35const BCG_PUSH_BOX_Q8: i64 = 100 // apply2_impl's body-presence push distance
36const BCG_PUSH_GAP_Q8: i64 = SPEED+SPEED/2 // an NPC one and a half walk steps behind the player
37const BCG_PUSH_COL: i64 = WX/2 // mid-window, so no window slide fires during the push ticks
38const BCG_CANOPY_REACH: i64 = 9 // canopy half-width in blocks: summon ring 4..7 blocks, passport 3
39const BCG_PASS_ARRIVALS: i64 = 3 // wc_pass_apply spawns at most three companions
40const BCG_STALE_SINK_Q8: i64 = EYE/2 // a stale spawn height: feet under the sand, eye above it

functions

42func bcg_number(value: i64, scratch: *u8) -> i64
called by 1: bcg_checks calls 1: nx_dec_emit_u63
47func bcg_abs(v: i64) -> i64
52func bcg_below(feet: i64, floor: i64) -> i64
57func bcg_structure(base: i64, x: i64, y: i64, z: i64) -> i64
64func bcg_place_oracle(base: i64, xq: i64, zq: i64) -> i64
75func bcg_arena() -> i64 { return sys_mmap(CRAFT_EXT_TOTAL) as i64 }
76func bcg_world() -> i64
81func bcg_free(base: i64) -> i64
86func bcg_checks() -> i64
250func bcg_census(ctr: *i64) -> i64
302func bcg_walk(ctr: *i64) -> i64
380func bcg_shift_burial(ctr: *i64) -> i64
430func bcg_support_depths(ctr: *i64) -> i64
486func bcg_respawn(ctr: *i64) -> i64
522func bcg_edge_npc(ctr: *i64) -> i64
577func bcg_push(ctr: *i64) -> i64
632func bcg_canopy(base: i64, cx: i64, cz: i64) -> i64
called by 1: bcg_placement calls 2: hq_getvset
644func bcg_placement(ctr: *i64) -> i64
710func bcg_fall(ctr: *i64) -> i64
761func main() -> i64