Times, trials, and turbulence.
I’ve been pretty busy lately with schoolwork, plus a long trip from campus to home for the weekend. Despite this, I’ve managed to keep myself motivated on getting a sufficiently fast voxel renderer working so I can develop this mini-game.
Having only my laptop with me (which runs on Linux) I was curious if I could manage to get the renderer working on a non-Windows platform. It worked without a hitch, aside from myself getting better acquainted with g++.
The method that I’ve (hopefully) settled on works by casting out two rays from the camera (one along the left side of the viewing frustum and one along the right) and stepping along them incrementally. For each step of the ray, the renderer linearly interpolations across the screen and world simultaneously, drawing vertical line strips to represent each voxel it comes across.
It’s not a very complicated algorithm, just like any of the others I’ve tried, but I think this route has the most room for speed enhancements. I feel like I’ve been working on this forever, but my goal is a steady 30-40FPS on my low-end-ish laptop before I accept the performance and start actually writing the game itself.
(The heightmap/detailmap belongs to this fellow, whose article provided me with some good general ideas about voxel rendering.)