Loading...
Loading...

A high-performance voxel game engine built from scratch using modern C++20, inspired by Minecraft. The engine features a modular architecture with core subsystems (graphics, rendering, scene, atmosphere, settings) decoupled from game logic. It uses OpenGL 4.6 Core Profile with aggressive face culling, frustum culling, and multithreaded chunk generation. The world system generates infinite procedural terrain using 3D Perlin Noise with biome transitions, spaghetti cave systems with natural water flooding, and destructible terrain via raycast-based block interactions. Rendering includes a dynamic day/night cycle with lunar phases, directional lighting with per-vertex ambient occlusion, screen-space ambient occlusion (SSAO), shadow mapping with cascades, transparent water, volumetric clouds, distance fog, and a weather system with rain/snow particles. The engine is registry-driven for blocks and textures, uses centralized configuration, and implements async chunk loading with BS::thread_pool for background generation while maintaining GPU uploads on the main thread.
The engine uses a modular architecture with core subsystems decoupled from game logic. Multithreaded chunk generation runs on BS::thread_pool in the background, with mesh building returning separate opaque/water meshes. GPU uploads are capped per frame and executed only on the main thread via ProcessPendingMeshes in ChunkManager. Aggressive face culling is implemented in ChunkMeshBuilder by checking neighboring blocks before adding faces. The registry-driven approach loads blocks and textures from JSON configuration files, centralizing tunables in WorldConfig/GameConfig. Cave generation uses SpaghettiCaveCarver with biome-aware noise, and weather particles respect per-chunk heightmaps from ChunkManager. SSAO uses precomputed kernel UBO with cached uniform locations for efficiency. The render pipeline processes opaque → water → outlines → sky/weather passes in sequence, driven by the main loop in Application.h.
The voxel engine delivers smooth 60+ FPS gameplay with infinite procedural terrain generation, realistic cave systems, and immersive weather/lighting effects. The modular C++20 architecture ensures clean separation between engine core and game logic, making the codebase maintainable and extensible. Multithreaded chunk generation with capped GPU uploads prevents frame drops, while aggressive face culling significantly reduces vertex count. The registry-driven configuration allows easy content creation and tuning. Comprehensive automated tests using Google Test ensure reliability across ray calculations, chunk storage, heightmaps, block registry, and voxel raycasting. The engine successfully demonstrates modern graphics techniques including SSAO, shadow mapping, volumetric clouds, and transparent water rendering, all running on OpenGL 4.6 Core Profile.


