- A simple hobby project: A Minecraft-inspired voxel game engine and prototype built with C++ and OpenGL.
- Goals: explore fundamental voxel rendering techniques, chunk management, and basic game mechanics.
- Fun fact: my 8 year old daughter helped make some of the block textures!
- Custom Textures: Unique block textures hand-crafted in GIMP for a distinct look and feel.
- Chunk-Based World: Efficient world streaming with chunk management, greedy meshing, and back-face/frustum culling for high performance.
- Block Variety: Core voxel types (dirt, grass, stone, water, etc.) with proper texture atlasing and UV mapping.
- Modern Rendering Pipeline: Shader-driven OpenGL rendering with support for lighting, transparency, and depth-sorted passes.
- Debug Interface: Built-in Dear ImGui panel for live debugging, tweaking parameters, and profiling engine performance.
- Biomes & Environment: Expand procedural generation with biome-specific features — trees, flowers, vegetation, clouds, and terrain variation.
- First-Person Camera: Add a controllable camera for free exploration of the voxel world.
- Physics & Collision: Implement simple AABB collision detection and movement constraints for the player.
- Lighting & Shadows: Introduce directional light and shadow mapping for more depth and realism.
- Saving & Loading: Add persistent world serialization for chunks and player state.
- Optimization Pass: Continue improving mesh generation, multi-threading, and memory usage for larger worlds.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You will need a C++ compiler (like g++), make, and the necessary OpenGL and GLFW development libraries installed on your system.
For Debian/Ubuntu-based systems, you might need (I use arch btw):
sudo apt update
sudo apt install build-essential libglfw3-dev libgl-dev libx11-dev libxrandr-dev libxi-dev libglm-dev-
Clone the repository:
git clone https://github.com/whleucka/voxel.git cd voxel -
Compile the project:
make
This will compile all source files and create the executable in the
bin/directory.
After successful compilation, you can run the game using:
./bin/appDrawing blocks couldn't be that hard... Right?
- F1: Show debug info/stats.
- F2: Toggle wireframe.
- F3: Toggle V-sync.
- W, A, S, D: Move camera forward, left, backward, right.
- Space: Jump.
- Mouse: Look around.
- ESC: Exit program.
Contributions are welcome! If you have suggestions for improvements, bug fixes, or new features, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- LearnOpenGL.com: Learning OpenGL resource.
- gimp: GNU Image Manipulation Program.
- GLFW: For window and input management.
- GLAD: For loading OpenGL function pointers.
- Dear ImGui: For the immediate-mode GUI used for debugging.
- stb_image: For easy image loading.