3 ms·
There were also tricks to extend this simple rendering algorithm to allow limited rotations around the other two axes, to look up / down slightly (just move eve
by pjtr 7y ago
There were also tricks to extend this simple rendering algorithm to allow limited rotations around the other two axes, to look up / down slightly (just move everything up / down; also implemented in the demo here) and to "lean" when steering left / right (just move everything up / down proportional to the distance from the center of the screen; not implemented in the demo here, but visible in the 1992 NovaLogic Comanche example GIF).
There were Turbo Pascal versions of this on websites in the 90s I think, but it seems they were lost.
- s-macke 7y agoIndeed, look up / down is very simple implemented. Just alter the horizon line position. This works for the human eye for small deviations such as ±20°, but will lead to perspective distortions for higher angles.
- pjtr 7y agoSame with leaning. Add one more line of code and tweak the draw call: var ylean = (input.leftright*(i/screenwidth-0.5) + 0.5) * screendata.canvas.height / 4; DrawVerticalLine(i, heightonscreen+ylean, hiddeny[i]+ylean, map.color[mapoffset]); It adds a lot to the "feeling" IMO :)
- s-macke 7y agoCool, that works!
- cr0sh 7y ago> There were Turbo Pascal versions of this on websites in the 90s I think, but it seems they were lost. You can still find a lot of this old code if you dig for it; lot's of it can be found on various SIMTEL MS-DOS ftp archive sites, for instance. I also think the textfiles site has some of it. Also archive.org might have some of it. Take a look around using google and such: "ftp msdos source code" etc - you'll find plenty to be sure (and even if you don't find what you're looking for, you're sure to find stuff you weren't expecting!)
- pjtr 7y agoThe one I remember was "voxel.pas by Steven H Don". A Delphi port survived here: http://tothpaul.free.fr/sources.php?dprgrp.voxel http://tothpaul.free.fr/sources.php?dprgrp.voxel Searching for "voxel" in https://github.com/nickelsworth/swag/ https://github.com/nickelsworth/swag/ also finds some very similar tiny Turbo Pascal programs.
- pjtr 7y agoA short article titled "Voxel Landscapes 2D and 3D By Scout/C-Lous" described most of the tricks, but I can't find the text anywhere. A similar article by the same author on another topic I found here https://github.com/ggnkua/Atari_ST_Sources/blob/master/Docs/2BUMP.TXT https://github.com/ggnkua/Atari_ST_Sources/blob/master/Docs/...