Rust Raycaster

Left: A raycast rendering of a room with silhouettes of cubes that are filled in with a gold brick texture. Right: An overhead view of the same room, with a cone of brown stopping at little golden squares, or the wall behind. Left: A distorted raycast rendering with flat colors. A gray column looms ahead in a dark room with bright golden walls. Right: An overhead view of a larger area, with a gray square casting a dramatic shadow in a cone of brown.

view github repository

Started on November 24, 2023. Retired on January 6, 2023.

About

I am curious about the history of early computer graphics. Recently it has been raycasters, especially the screensaver I stared at for ages as a kid. I am not the only one motivated by this experience. See also Screensaver Subterfuge and Maze 95 JS.

To start writing this raycaster, I read Dmitry V. Sokolov's Tiny Raycaster tutorial to get inspired and get a head start on the algorithm. It was helpful to get some momentum, but I've found F. Permadi's Ray-Casting Tutorial for Game Development and Other Purposes (1996) to be very useful in actually understanding the math enough to write test cases.

While I'm still definitely in the prototype stage, things are coming together. I have learned a lot about writing Rust from this project. I'm not sure what I'll make out of it yet, but I hope to do something fun with it.

The color palette I'm using is Rust Gold 8. I like the atmosphere it brings.

Other cool raycasters