I thought it would be pretty fun to do a Wolf3D-style raycasting thing, and it ended up with no fps. Click and drag the mouse on the viewport to move, or click on the map to edit it.

On one hand this does sort of work. You can draw mazes on the left and walk around them on the right. But it has Problems:

Although it's 136 lines of code, most of that is really the UI interaction. The actual raycasting code is only 35 lines, and even that has some debugging and profiling cruft in it. It took me about 3½ hours to write the whole thing, though, again, a lot of that was UI tweaking.

In retrospect it would have been better to implement 2-D vector operations including addition, subtraction, scalar multiplication, elementwise division, angle generation ({x: Math.cos(θ), y: Math.sin(θ)}), canvas size, and clamping to within bounds.