Stability, smoothness, breakage
New features:
- Water is drawn just like in Minecraft! That's right; even when looking through 10 layers of water, it will look like there's just 1 layer.
- Make see-through leaves a little nicer.
- Fix crashing and texture bugging when growing world too quickly.
- Smoother experience because new chunks are only queued for generation when crossing a chunk border.
Technical details:
- Read a book on modern CMake and greatly improved my project. Now generating it is as simple as
mkdir build && cd build && build ..
, and you can even compile it from the command line! - Code a little more organized with an FBO class.
- Store each minichunk's meshes in a FBO instead of in a bunch of separate VBOs.
- Draw water opaquely then merge it over top of the rest of the world. This keeps water rendering consistently regardless of which minichunk is drawn first.
- Attempt to manually reduce some branching.
- Fix crashing and texture bugging when growing world too quickly. It was a multi-threading issue (two threads accessing an std::unordered_map at the same time); I had to add some locks to fix it, which unfortunately slowed down the program.
- Smoother experience because chunk pointers are now stored/access contiguously in memory when rendering.
Controls:
- F11 fullscreen
- R toggle mouse raw input
- T toggle t-junction fixing
- Mouse look around
- WASD move around
- Shift/space move up/down
- ESC quit
- N toggle noclip
- P cycle polygon mode
- [+ or numpad+] (press once or hold) increase render distance
- [- or numpad-] (press once or hold) decrease render distance (without unloading existing chunks)
- C toggle face culling
- Left-click destroy block
- Right-click place flowing water
- F3 enable debug overlay
- Scroll change block type (active block type visible in debug menu)