WSQE - Move
AD - Turn left right
M - Map
P - Edit mode (visible only when map is turned on)
In Edit mode:
Z - Add point
X - Delete point
Space - Join points
1+2+9+0 - Reset map
It's more rasterizer than raycaster but the effect is similar.
2D vector lines are projected into 1D canvas and depth of 'pixels' are compared.
Rasterizing algorithm is not using trigonometric functions. Yayć :D
http://scratch.mit.edu/projects/embed/23892778/ - Might be faster