Runtime map
Entry and scene ownership
Section titled “Entry and scene ownership”The project starts at scenes/Main.tscn, selected in project.godot. The main scene owns the top-level client flow: title/menu screens, world entry, and transition into the playable world. Scene files express composition; C# scripts own domain behavior. When tracing a feature, start at the scene node with the behavior, follow its attached script, then inspect the caller that creates or updates it.
The world runtime
Section titled “The world runtime”src/World/WorldManager.cs coordinates the active world. It connects chunk storage and meshes to block access, scheduled updates, entities, lighting, and world time. It is a coordinator, not the place for every block rule. Blocks receive a level-facing API and decide their own placement, neighbor, tick, interaction, and signal behavior.
The world is spatially divided into chunks; each chunk is divided vertically into 16×16×16 sections. Sections are the compact storage and mesh-rebuild unit. Chunk and section boundaries also define useful places to reason about visibility, lighting, and generation.
The player and frame loop
Section titled “The player and frame loop”The player controller gathers input and coordinates camera, movement, interaction, inventory, and HUD state. Gameplay should be traced through the action owner (for example BlockInteraction) rather than by adding more unrelated rules to the controller. Godot callbacks provide engine integration; systems with game-tick semantics should use the world’s tick scheduling and clock abstractions.
A practical trace
Section titled “A practical trace”For a block click, follow: input mapping → player interaction/raycast → target block behavior → level write → neighbor/tick/lighting work → affected section mesh update. For world creation, follow the world scene → WorldManager initialization → chunk generator and biome composition → chunk/section storage → meshing and display.