Dynamic Lights: A Small Adjustment

These past few days have been hectic but eye opening, specifically about marketing my work. That’s why I was glad to finally find some time to do what I love most: developing games. After getting my first asset Block Lighting Engine 2D up and running on the Unity Asset Store and working hard on my second asset, I decided it was time to grab Evergreen again and actually work on a game instead of an asset. This time I wanted to go ahead and add dynamic light support to my lighting engine.

Up until now, all lighting in Evergreen could be considered static. They’re not moving! So what if you want to make moving (dynamic) lights? Thankfully my lighting engine could be easily tweaked to support this, which turned out to be easier than I thought. If you think about it, a moving light in a block-based world should only have to actually move once it enters a new block position, right? And how does one move a light? Well I can already remove light and update new light with my lighting engine so the answer is easy. If a light source moved to a new block, remove all of its light, make sure the source’s position is set to the new block and spread light from the source again! This results in the video above, showing the moving red light of my little orb friend. Oh and ignore the player character. He’s seeing a bit green due to lack of pixel art!

It feels good to be working on this again, although very soon Global Game Jam 2019 will start and I’ll nerd out an entire weekend with my team Devious. I won’t be able to post much, but soon after I’ll have some video footage and a story to tell about our little game! Stay tuned!