项目
在 GitHub 查看 Minecraft from scratch

GianlucaP106/minecraft
关于
Minecraft clone from scratch with only OpenGL
游戏与模拟器可以做什么
- 🌍 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
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- +1
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Minecraft from scratch 
A Minecraft clone from scratch with only OpenGL. No game engines or frameworks.
https://github.com/user-attachments/assets/ba68da39-bf90-4e17-b6ad-3e84fae37e23
✨ Features
- 🌍 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
🛠️ Installation
# 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/
🎮 Controls
| 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 |
🧪 Technical Highlights
🖼️ Graphics
- Uses OpenGL 4.1
- Custom shader programs for blocks, UI, and lighting
- Frustum culling for performance optimization
🌄 World Generation
- Multi-octave Perlin noise for terrain shaping
- Biome system to vary landscape types
- Procedural caves and tree generation
- Real-time chunk loading/unloading
⚙️ Physics
- Custom physics engine with rigid body dynamics
- Block-based collision detection
- Jumping & flying mechanics
🧩 Architecture Overview
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
📦 Dependencies
This project uses ONLY the following Go packages:
⚠️ Disclaimer
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.
探索相关项目
加载中…