This is a simple demonstration of raycasting in java. It is a tad buggy due to bad design, but fun to play around with.

The controls in this version are:

  • Movement: Up, Down, Left, Right arrows.
  • Debug mode: Space bar.
Mike's Raycaster at work

Download

Version 0.5

This is a java port of the original version, fixing some of the dodgier rendering bugs. Works on GNU/Linux and Windows:

Version 0.04

This version was written in Visual Basic 6, so it is Windows-only.

Mike's Raycaster at work

Map design

The maps follow a fairly simple formula. An "X" marks the start, and each colour of block has a number. Here is the code to the default map:

Example Map
11111112222222555555555555
1     12  2              5
1     12  2   44444444   5
1 1  112  2          444 5
1         2            4 5
1  00000  2   333333     5
00     0  2        33    5
7      0    6          X 5
0 07  0   6666666666   6 6
7  0      6            6 6
00 7      6            6 6
7  0    6 6 5 4 3 2 1 66 6
0 0123456701234567012345 6
0                        7
00123456701234567012345670

The first line is simply the name of the map. Also note that at the player faces north at the start.