A simple raycasting engine in Java

Use the arrow keys to move around, or use I, K, J, L.
(If the keyboard is not responding, then the applet has probably lost focus,
click inside the applet to regain the focus.)
On the right side is the overhead map.
The red line shows the direction of the player.
The yellow area on the overhead map is the player's field-of-view,
it shows the rays being 'shoot' by the player.

So that the source code is easier to understand, this applet has the following limitations:

  • no collision detection (you can walk through walls).
  • no texture mapping.
  • not optimized (it's slow).
  • not using shift operators.

The source code is here.
References: 

  • LaMothe, Andre, et al. Tricks of the Game Programming Gurus. Indianapolis, Sams Publishing, 1994.
  • Lampton, Christopher. Garden Of Imaginations. Corte Madera, CA: Waite Group Press, 1994.
  • Ray Casting Tutorial

This applet programmed by F. Permadi, 1997
Exit