Engineering · Graphics/3DApr 2026
Mini Minecraft
A full 3D voxel world engine, built from first principles in C++ and OpenGL.
This was a university class project, so the repo is kept private, but I'm happy to walk through the code on request.
Overview
A faithful Minecraft engine: no game engine, no framework
Mini Minecraft is a tight, roughly month-long group project for CIS 4600 (GPU Programming) at Penn, built through April. The goal was to rebuild Minecraft's core engine (procedural world generation, real-time rendering, player physics, interactive terrain) using only C++17, OpenGL 3.3, and GLSL, with no game engine or rendering framework. The final codebase spans 26 C++ source files and 13 GLSL shaders.
It ran across three milestones, each teammate owning distinct systems. My contributions spanned 7-biome procedural terrain, 3D cave generation with post-process fluid overlays, and a full render-pipeline upgrade: PCF shadow mapping, screen-space reflections, vertex ambient occlusion, distance fog, Blinn-Phong specular, and a day-night cycle.
Milestone 01
Generating an infinite world across biomes
The world blends 7 biomes seamlessly from large-scale noise. Grassland and forest use a Voronoi-based hill field for soft rolling terrain; mountain and rocky variants use fractal Brownian motion over Perlin with an abs() warp for sharp STONE peaks capped in SNOW above Y=200; desert and snowland use low-amplitude Perlin fields surfaced with SAND or SNOW.
Biomes blend via a large-scale Perlin value remapped to [0,1] through smoothstep(0.25, 0.75), used as the interpolation weight between adjacent height fields: clear zones, smooth transitions. Columns fill STONE from Y=0–128, biome surface Y=128–255, and empty columns between Y=128–138 fill with WATER for lakes and coastlines.
Terrain
Milestone 02
3D noise caves, fluid physics, and a post-process pipeline
3D Perlin noise (8 surflet contributions per grid cell, trilinear interpolation) carves every block below Y=128 where the value goes negative; caves below Y=25 fill with LAVA and all Y=0 blocks become unbreakable BEDROCK.
WATER and LAVA are non-solid: the player moves at 0.8× speed inside fluid and swims up on Spacebar, with immersion read from both body and camera position. A post-process pass renders the scene to a framebuffer, then draws it on a fullscreen quad with a blue (water) or red (lava) tint based on camera position.
Caves
Milestone 03
Shadow mapping, SSR, ambient occlusion, and more
The final milestone was a full render-pipeline upgrade. PCF shadow mapping renders the scene from the light's orthographic view into a depth buffer; terrain fragments compare depth with a 7×7 PCF kernel and slope-scaled bias (with texel snapping) to kill acne and Peter-Panning.
Screen-space reflections ray-march water rays against a view-space position buffer, blending with Fresnel weights and shoreline masking. Vertex ambient occlusion bakes per-face occupancy into the 64-byte interleaved vertex layout. A unified day-night cycle drives sun position, light color, fog, and sky gradient together, with Blinn-Phong specular tuned per material.
Rendering
Reflection
What building a graphics engine teaches you
Building a renderer from first principles forces you to understand every stage — there's nowhere to hide when the shadow acne is yours. The biggest lesson was systems discipline across a team: clean interfaces between terrain, streaming, physics, and rendering were what let three people move fast without stepping on each other.
Outcome
Credits
- Brian LeeGraphics & systems: procedural terrain & biomes, 3D caves + post-process, and the render pipeline (PCF shadows, SSR, vertex AO, day-night, fog, Blinn-Phong).
- Angelina HuTerrain chunking (interleaved VBOs + face culling), multithreaded chunk streaming, view-frustum culling, day/night visuals, procedural assets, and audio.
- Seth ThorPlayer physics & collision, texture-atlas UVs, animated water/lava shaders, A* pathfinding on a thread pool, and a predator-prey NPC ecosystem.