Ray Casting Techniques Demo Series - Part 1

This is a ray casting demo, to be used as a companion to the Ray Casting Tutorial at https://permadi.com/1996/05/ray-casting-tutorial-table-of-contents/

Ray-casting is a 2.5D rendering techniques that was very popular in the 90s, seen in computer games and video games such as Wolfenstein 3D.

This first of a series of demos demonstrates:

  • Wall finding algorithm.
  • Lookup table generations (sine, cosine, fisheye correction tables and more)
  • Distortion corrections. Ie: How to deal with fishbowl/fisheye effects (bent walls).
  • Simple flat wall shading (rendering wall slices with simple solid colored lines).
  • Rendering of simple (static) ground and sky (with gradients added for a bit of polish)
  • Movement handling using keyboard keys.
  • Overhead map to visualize where the rays are and where they hit the walls.

    To move around the demo, use the arrow keys on your keyboard or the W,A,S,D keys.

    Checkout the source and other demos in the series in the Git Hub repository