Laser Puzzle
A mirror-and-laser puzzle built for the DE1-SoC's RISC-V environment.
Rotate mirrors to hit every target before time runs out. Avoid the hazards.
?Controls
Up and Down select a mirror. Left and Right rotate it. Space pauses. R resets.
Web version built with JavaScript and Canvas.
Behind the puzzle
The original game uses a 320 × 240 VGA framebuffer, 13 mirrors, six targets, four hazards, two lives, and a two-minute timer. Integer coordinates keep beam reflections, collisions, and rendering in sync.
I separated geometry, timing, and game state to make the mechanics testable and reproduce them in this browser version. The key lesson: a one-pixel error can change the entire reflection path.
How to play
Select a mirror, rotate it to reflect the beam, and route the laser to every target within the time limit.
View original source