code wiki / (root) / nx_game_engine_compose_test.nx

nx_game_engine_compose_test.nx

buildroot/runtime/nx_game_engine_compose_test.nx

5408 B131 linesdepth 5pulls 13 transitivereach 0 importersview sourcekind gate/prooftopic game
docsdependenciesstructsconstsfunctions

about

nx_game_engine_compose_test.nx -- the full game-loop scaffold. All 4 new primitives composed with the prior Minecraft-MCU substrate. Realistic game-loop shape: 1. world_seed generates 16x16x8 terrain from seed=42 2. font + 1bpp framebuffer prepared 3. raycast + dither pattern renders the world to fb 4. text_render overlays "Z42" coordinate 5. input drives camera movement 6. q14_math normalizes camera direction This proves the substrate-side game engine works end-to-end on a hardware-floor that maps cleanly to ESP32-class silicon.

dependencies 11 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_palette.nx nx_tissue.nx nx_raycast_voxel.nx nx_fb_1bpp.nx nx_input_gpio.nx nx_q14_math.nx nx_font_1bpp.nx nx_text_render.nx nx_game_engine_compose_test.nx

diagram shows first 10 each side; +1 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_tier.nxnx_palette.nxnx_tissue.nxnx_raycast_voxel.nxnx_fb_1bpp.nxnx_input_gpio.nxnx_q14_math.nxnx_font_1bpp.nxnx_text_render.nxnx_world_seed.nx

imported by: nobody (leaf or entry point)

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

main nx_world_seed_generate _height_at nx_xorshift64 nx_fb_1bpp_new sys_mmap nx_fb_1bpp_clear sys_mmap ↻ nx_font_new sys_mmap ↻ nx_font_has_char nx_text_render_string nx_text_render_char nx_font_has_char ↻ nx_font_glyph_pixel nx_font_glyph_at nx_fb_1bpp_set_pixel nx_fb_1bpp_count_on nx_q14_vec3_length nx_q14_vec3_dot nx_q14_sqrt nx_q14_abs nx_q14_cos nx_q14_sin _sin_lut nx_q14_sin ↻ nx_ray_new sys_mmap ↻ nx_raycast_voxel _sign _abs_q14 nx_fb_1bpp_dither_4 nx_fb_1bpp_set_pixel ↻ nx_input_gpio_new sys_mmap ↻ nx_input_gpio_poll nx_btn_is_valid _gpio_state nx_input_gpio_is_pressed nx_btn_is_valid ↻

structs

none

consts

none

functions

27func main() -> i64