A Minecraft clone from scratch with only OpenGL. No game engines or frameworks.
demo.mp4
- 🌍 Infinite & procedurally generated terrain using Perlin noise
- ⚙️ Physics engine with collision detection and response
- 💡 Dynamic lighting with shadows and day/night cycle 🌞🌙
- 🧱 Block placement and destruction
- 🌳 Tree generation & basic cave systems 🕳️
- 📦 Dynamic chunk loading/unloading based on player position
- 🎯 Frustum culling for rendering optimization
- 🎒 Simple inventory system with hotbar (1–9)
- 🕹️ Flying mode for creative exploration
- 🗺️ Biome-based terrain variation
# Clone the repository
git clone https://github.com/GianlucaP106/minecraft minecraft && cd minecraft
# Run the game (requires Go)
go run .
📦 Make sure you have Go installed: https://go.dev/dl/
Action | Key/Mouse |
---|---|
Move | W , A , S , D |
Jump | Space |
Toggle Fly | F |
Look Around | Mouse |
Break Block | Left Click |
Place Block | Right Click |
Select Item | 1-9 |
- Uses OpenGL 4.1
- Custom shader programs for blocks, UI, and lighting
- Frustum culling for performance optimization
- Multi-octave Perlin noise for terrain shaping
- Biome system to vary landscape types
- Procedural caves and tree generation
- Real-time chunk loading/unloading
- Custom physics engine with rigid body dynamics
- Block-based collision detection
- Jumping & flying mechanics
The engine follows a component-based design. Key systems include:
- 🎮 Game: Core game loop and simulation
- 🌍 World system: Chunk loading, block updates
- 🧬 Generator: Terrain, trees, caves, biomes
- ⚙️ Physics engine: Collision, movement, response
- 🧑 Player: Camera, controls, raycasting
This project uses ONLY the following Go packages:
This project is developed for educational and non-commercial purposes only.
It is not affiliated with or endorsed by Mojang, Microsoft, or any related entities.