We got some world building done

After working around and tweaking with world building we found comfortable flow.

Player = your controlled character.

ChunkManager = “World Boss”, tracks which chunks to load/unload.

ChunkQueue = “To-Do List”, schedules jobs in threads.

ThreadedVoxelJob = “Land Sculptor”, makes raw block data.

ThreadedMeshJob = “Shape Maker”, builds the 3D mesh.

Chunk = holds mesh + voxel data for a piece of world.

Screen = Godot’s scene tree where visuals actually show.

As you can see we update world using player as center point and generating more world in background threads.

End result of this cycle:

  • Chunk system
    • Split world into chunk grid (ChunkManager, Chunk, ChunkData).
    • Each chunk stores voxel IDs + shapes.
  • Threaded generation
    • ThreadedVoxelJob fills chunk data off the main thread.
    • Added debug counters (e.g. voxel count).
  • Threaded meshing
    • ThreadedMeshJob builds mesh arrays in background.
    • Added debug counters (vertices, indices, UVs).
  • Queue & throttling
    • ChunkQueue schedules jobs.
    • Limited number of jobs per frame (e.g. 2–4) → prevents startup lag.
  • Surface vs full detail
    • Distant chunks: only surface layer for speed.
    • Nearby chunks: upgraded to full depth, diggable.
  • Mesh + collision apply
    • Back on main thread, ChunkManager applies mesh & physics to the Chunk.
  • Debug UI / logs
    • Show loaded chunks, cache size, job counts in DebugOverlay.
    • Print APPLY_MESH logs with origin + surfaces.
  • Configurable rules
    • BlockAtlas + world_rules.json to define strata and ores.
    • Built-in fallback rules if file missing.

⚠️ Current problems still open

  • Meshes are being applied with surfaces=0 → nothing visible.
  • Need to trace why mesh builder produces empty arrays.
  • Verify height function + block picking feed real voxel data.

What next

I want to add inventory option. Plan is to add minimal backpack to move ground so you cant just hold whole chunk inside your pockets but you need to dump stuff somewhere 🙂


Comments

Vastaa

Sähköpostiosoitettasi ei julkaista. Pakolliset kentät on merkitty *