Site Overlay

Mirrors

Worked on a new puzzle element this past month… mirrors which will reflect the shadow’s position onto the next surface (and also show a sliced reflection of Luna). Somewhere between realistic and strictly functional, it currently only draws the reflected shadow if it would cause Luna’s active shadow to be reflected. (Also ignoring for now how the mirror itself would basically become a new light source with all the light Luna isn’t blocking and therefore cause her to cast a second shadow…)

There are still more cases I still need to implement (like ceiling mirror and leftward mirror) but still pretty satisfied with how this came out after spending much longer than I really should have trying to do the math on drawing just the reflection of Luna’s sprite in a way that it gets trimmed properly and only draws the part overlapping the mirror. Had to swing a lot between local coordinates on the sprite and relative coordinates in the room (relative to the mirror and room origin).

This was the first time in a while where I had to actually sketch out a lot of my process on the design/code work to figure out what I was doing, so I thought it would be fun to throw some of those in this post.

Planning the difference cases I would need to account for in the code while drawing Luna’s reflection on the mirror (with a fourth that I had to add later when I realized I did actually have current sprites wider than the mirror)
Finding my way towards the section of the shadow that I want to draw a reflection of, and when it should be drawn
Copyright © 2026 Detta's Designs. All Rights Reserved. | Catch Vogue by Catch Themes