This was my first time building a raycasting light system from scratch.
I learned how to: Cast hundreds of rays from the player to simulate realistic light beams Make collision detection work with dynamic platforms (tiles that are solid only when lit) Handle physics and platformer movement in JavaScript Design levels that teach the mechanic without tutorials
How I Built It: The game is built in pure HTML5 Canvas and JavaScript — no frameworks, just raw code. The light mechanic works by: 1) Casting 220 rays in a cone from the player's lantern 2) Each ray checks which tiles it hits and "lights them up" 3) The physics engine only treats lit tiles as solid platforms 4) Players aim with the mouse to change where the light points
Challenges I Faced: The hardest part was balancing the light radius and platform spacing. If the light reached too far, levels became trivial. Too short, and they felt impossible. I also had to fix edge cases where players could get stuck inside walls or fall through platforms mid-jump. Lots of playtesting and tweaking collision detection!

Log in or sign up for Devpost to join the conversation.