Cube Mining: A 3D Voxel World in Defold

A 3D voxel mining example built with the Defold Game Engine. This project demonstrates how to handle dynamic voxel environments, efficient mesh generation, character and NPC physics.


Controls

Move `W`, `A`, `S`, `D` 

Sprint `Left Shift` 

Ascend / Descend `Space` / `Left Ctrl` 

Break Block `Left Click` 

Place Block `Right Click` 

Toggle HUD `M` (Cycle: Off / Text / Text + Graph) 

Toggle Noclip `P` 

Spawn Mouse `T` 

Spawn Mice Rapidly `Y` (Hold) 


This demo features a Greedy Meshing algorithm that merges adjacent faces into larger quads to reduce vertex count, a Swept AABB Collision System for interaction with the voxel world, and real-time interaction with block placement and destruction. Includes Golden Ore and unbreakable bedrock layers. The system includes Runtime Sprite-to-Mesh Voxelization that converts 2D pixel art sprites (like guns or swords) into 3D voxel meshes, and Performance Monitoring with player position tracking. Smart Culling excludes hidden faces to increase efficiency. The demo runs on a 16x16x16 voxel cube. Mesh generation currently runs on the main thread causing minor hitches during massive world updates as the buffer rebuilds.




🧡 Support the Developer

This project is open-source and inspired by the community. If you find it useful or want to see more features like infinite chunking or procedural terrain, consider supporting the development:

☕  Donate here: https://cenullum.com/donation


CHECK OUT THE CODE

https://github.com/cenullum/cube-mining Licensed under MIT



Updated 1 day ago
Published 12 days ago
StatusReleased
PlatformsHTML5
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
Authorcenullum
GenreSurvival
Made withDefold
Tags3D, Minecraft, Sandbox, Voxel

Leave a comment

Log in with itch.io to leave a comment.