Weekly Update – January 15, 2022

This week was spent finishing the [2022 in RoguelikeDev] post and continuing work on lighting.

Light from a brazier
Ran out of torches
Light leaking through walls (need to fix)
Illuminating a hallway (walls not showing, sort-of fixed since)

My lighting efforts alternated between two idioms: spinning my wheels and going around in circles. I learned some things at least. It became apparent that I don’t completely understand how I want lighting to work. The challenge is integrating lighting into fog of war, field of vision, and orthographic projection. On top of that, I’m still learning general lighting concepts and the Smart Lighting 2D Unity asset, which is fantastic but really lacking in documentation.

The lighting work also resurfaced another issue that I’ve yet to resolve: hiding portions of wall tiles that represent the other side of the wall and that the player shouldn’t be able to see. This is particularly an issue with the Oryx tileset because the walls have a top-down projection. Players can determine whether the tiles adjacent to a wall tile are floors or walls, even though those tiles are outside the player’s field of vision. It also makes secret doors easy to spot. The best solution I’ve come up with is to add a shadow tile map above the wall tile map that covers the quadrants of the wall tile that the player shouldn’t be able to see. But, it’s been a real struggle figuring out the logic that determines which shadow tile to choose based on the adjacent tiles.

A lesser concern, but still something that needs to be addressed, is how lighting affects the minimum hardware requirements. In many games, lighting effects are graphics options that can be turned on and off. In Legend, lighting is part of the gameplay and can’t be optional. I want to keep the hardware requirements as low as possible so that Legend can be played on older computers.

Next week, I’ll continue setting up lighting.






Leave a Reply

Your email address will not be published. Required fields are marked *