2.5D rendering on PlayDate

97 points by carlana


brudish

For each ray a vertical span, centred vertically in the window, is drawn. The length of this span is a fixed constant divided by the depth. So the farther away the wall is for that pixel column, the smaller the vertical line drawn. This is how perspective is achieved. It’s a bit difficult to see without textures, so let’s add a bit of fog.

This explanation along with the pictures above and below it made something finally click in my head about how to do this. That’s really excellent!

alper

Such an amazing write-up.

4ad

Great article, and the game looks amazing! Also, I didn’t know about this console, so thanks for bringing it up to my attention! I very much appreciate the concept and its limitations.

jmtd

If you liked this, you’ll probably enjoy Senglard’s “Black Book”s. I’m fairly sure they’ll have been posted to Lobsters in the past, but here’s a wrap-up post to both the Wolfenstein 3D one and the Doom one: https://fabiensanglard.net/gebb/index.html