What does HackerNews think of VoxelSpace?

Terrain rendering algorithm in less than 20 lines of code

Language: C

I'm reminded of the render algorithm in Comanche, the 1992 video game [0]. I find it remarkably ingenious, and it certainly felt incredible at the time.

[0] https://github.com/s-macke/VoxelSpace

Not quite the same but reminds me a lot of the Commanche JS demake called VoxelSpace: https://github.com/s-macke/VoxelSpace
That's an impressive list of games. I don't know how many hours were spent reverse engineering these games.

I did a bit of reverse engineering myself on some 3D game worlds. Test Drive 3 [1] and Comanche [2]

[1] https://simulationcorner.net/td3/td3.html

[2] https://github.com/s-macke/VoxelSpace

The „Voxel Space“ engine from the 90th has only very little to do with what we call voxel today. It it basically a raycasting engine for height maps [0]. It is very limited. You can‘t look up and down more than 20 degrees and you can‘t even render houses, cars or trees.

[0] https://github.com/s-macke/VoxelSpace

Hey HN,

I've been inspired by Michael Fogelman's Craft [1] and other links around here over the years to learn more about 3d graphics programming. comanche has been my path to learning. It can currently render 30 different maps - 29 of them were reverse engineered by Sebastian Macke [2] from the game Comanche (1992). There's no actual relation to the game, I just remember playing it as a kid and the file format is convenient (two pngs, one representing height, the other color). There is a lone map by me.

The goal is to build an actual game, but the focus will always be to have very readable source so that others can learn from it. I've written a blog post further describing the goals behind it as well as discussing the basics of graphics programming and the advantage of using WebGL [3]. There are plenty of links to resources for further learning and the post also includes links to 8 other projects in various languages (lisp, Go, Rust, C++, and Nim) in various states of completion.

Happy to accept questions, contributions, or (gulp) critiques. There's not a lot of optimization going on (some basic culling), but it should run fine on a modern GPU (though it did not run on my mobile phone). Some of the maps are smaller, should that help. It's not super impressive, but hopefully you find it interesting. Thanks!

1. https://github.com/fogleman/Craft

2. https://github.com/s-macke/VoxelSpace

3. http://lebo.io/2018/04/03/a-webgl-renderer.html

source: https://github.com/aaron-lebo/comanche

Very similar technique (raycasting), but for different type of data.

https://github.com/s-macke/VoxelSpace

The text in the README describes the technique very well. The JavaScript code is a little bit more complicated to read because most of the source contains the usual organizational tasks around the algorithm (initialization, keyboard input, ...). But this is also true for the provided C-code of this article.