C++ Application for exploring Minecraft Beta 1.7.3 Worlds
This project was an idea I had around the middle of 2023 but due to various factors, mainly me being busy with school and work, I was unable to realize it. As I'm unemployed right now, I figured I may as well get busy and learn some proper C++ and finally delve into OpenGL. This project is the result of that.
As a first step, I decided to see how far I could get with Python, to see how difficult it'd be to decypher Minecraft Beta's McRegion file format. Soon enough, I was able to extract the raw block data and dump it into a binary file. I reused the code of an old voxel world gen attempt I made in Godot, and reworked it to accept said binary files. Lo and behold, a chunk was loaded.
The next day I rewrote that code directly in GDScript to load whole McRegion files entirely in Godot, now allowing arbitrary regions to be loaded. However, due to each cube being rendered individually, the performance was rather abysmal. As a result, I figured I'd challenge myself and recreate something like it from scratch in C++ and OpenGL.
The Python and Godot experiments of this project are linked here.
This is moreso a disclaimer. I'm new to C++, so there'll be lots of C-isms as I try to get a proper grip on how C++ works and how to properly work with various OOP-isms. If there's code that looks out of place or outright bad, feel free to give tips as to how to improve it. I'd love to learn more!
In an attempt to keep this Code somewhat readable for other people (and for me in the future), I've chosen to employ the Never Nest design pattern.
Please refer to the following video as to why: "Why You Shouldn't Nest Your Code" by CodeAesthetic
- Import Beta 1.7.3 compliant Minecraft worlds
- Decode Chunk Offset
- Decompress Chunk Data
- Gzip
- Zlib
- Decode NBT Data
- Turn NBT Data into C++ Objects
- Extract Block Data
- Render Block Data (via OpenGL)
- Render something
- Render a Texture
- Render a Cube
- Have a Camera that's keyboard and mouse controlled
- Add Lighting
- Model Importing
- OBJ
[ ] glTF
- Render a Chunk
- Render a Region
- Render Multiple Regions
- Render per-face Block lighting
- Render Sky Lighting
- Render Block Lighting
- Fog
- Dynamic Chunk Loading
- Windows Version - stb causing issues here