Everything's a lot smoother - and faster!
New features:
- Debug overlay can be enabled with F3
- Water now flows into empty spaces - try it out! (right click)
- "Deep blue water" effect when underwater
- Much smoother mouse, chunk loading, block destruction, mesh generation, loading mesh to gpu
- Significantly higher FPS
- Block textures are no longer see-through when viewed at an extreme angle
- Far-away blocks are much less grainy now
- Fix tiny pixels / pixel-lines shining through in dark areas
- Fixed a crash caused by OBS hooking onto our program
Controls:
- 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)
Technical details (not very interesting):
- Created a program for drawing text on the screen
- splits viewport into evenly-sized grid of letters
- horizontally, always fit a pre-defined number of letters
- vertically, scale size to keep the grid elements square
- Speed up drawing by rendering quads as triangle strips
- Switched to
GL_NEAREST
min-filtering in order to prevent partially-transparent from affecting depth buffer at extreme angles - Add mipmapping to counter the grainyness of
GL_NEAREST
- Create my own mipmap function which doesn't create translucent pixels like OpenGL's does
- The downside: Far-away leaves are less see-through.
- The upside: Far-away blocks look way smoother than in Minecraft.
- Fix the t-junctions caused by greedy meshing by running a t-junction filter over my render.
- For any pixels whose depth wasn't written to, fill it in using its neighboring colors/depths.
- Add precompile header
- Much smoother mouse, chunk loading, block destruction, mesh generation, loading mesh to gpu
- Mouse is smoother because we're doing less every loop
- Chunk loading is smoother because of smarter/faster algorithms
- Block destruction is smoother because
a. we're re-generating meshes for the minimum number of blocks
b. our mesh-generation thread generates it now instead of us
c. our mesh-generation thread is immediately woken up with a conditional variable, instead of having it sleep and loop. - Mesh generation is smoother because of smarter/faster algorithms
- Loading mesh to GPU is faster because I put all quads on one buffer now (instead of 5), and I do it all with a single std::copy call.
- Fixed a crash caused by OBS hooking the program, by making sure the default framebuffer is bound to
GL_DRAW_BUFFER
before I swap buffers. - Added more per-voxel data so we now can't handle more than a 47 render distance.
- Gonna try to fix this by storing data in interval maps.