
This is the beginnings of a game based around light I started thinking about a few years back. I’m not entirely sure what direction I want to take the project yet, so it’s mostly a playground for game mechanics and systems that I come back to play with occasionally. The core idea is a world that is entirely pitch black, full of dangerous monsters. You are safe only in the light, and must light your way forward to explore the world. It was inspired by the Kryll from Gears of War, and the night time gameplay of Don’t Starve.
The biggest question I set out to answer when starting this project was how I could handle dozens or potentially hundreds of light sources on the screen without taking a big performance hit. The answer ended up being pretty simple- Deferred Lighting. It essentially means that the light calculations for rendering a frame depend on how many pixels on the screen are lit, rather than how many lights are present in the scene. It also removes the hard limits on how many lights can affect objects in a scene at a time.

Another fun rendering solution I explored is the ‘Tilted Top-Down’ method, where we have a top-down camera view at an angle to the ground creating a sense of perspective, but the sprites are billboarded or angled to face the camera flat. Many 2.5D games use this approach, Hotline Miami and Don’t Starve being a couple examples. My approach is more similar to Hotline Miami, in that the camera angle does not change or rotate. My camera is at a 45 degree angle to the ground, so my sprites are tilted at a 45 degree angle to compensate, as seen above. I’m very happy with the look of it.

Since light is a pivotal game mechanic here, I wanted to include colored light as well. My thought is that some monsters could be defeated using only certain colors of light, or puzzles could be color-based. However, this provided a challenge with sprite rendering. Light sources work just fine for the ground, but the player would only be properly illuminated when directly above or below a light. This is because lighting is typically based on surface normals, and the sprite normals in my setup are only facing the light when it’s directly above or below the light. I needed the player sprite to light up strictly based on it’s proximity to a light. I decided against trying to force the lights to cooperate, and instead used the unlit sprite shader and handled my own lighting logic. As the player moves around, a physics trigger is detecting nearby light sources, checking the distance of each light source to the player, and adding up color values from each light based on that distance. This works well and means that different colored lights will blend together as the player moves in between them.
I’ve also learned a lot about Unity’s sprite and animation system for this project. I draw the sprites frame-by frame to achieve the ‘boiling lines’ animation effect. I love this style in general and It’s very fun to draw. I also take advantage of the effect to portray some emotion- the eye monsters have a much more pronounced squiggle when they are angry and chasing the player. It’s subtle but does a good job of making the monsters feel more scary. The sprites are imported as sprite sheets, then sliced up and animated using Unity’s built-in sprite tools and animation controllers. These are tools I haven’t used much in the past, so it’s been good practice playing around with them.
You can play around with it here. It’s not a functional game yet, but you are able to experiment with the lights and monsters. Hopefully I’ll get around to expanding it into a full game eventually when I figure out what the rest of the game will be. I know I want players to explore and find big monsters in the world that must be defeated using light and color in clever ways. I’ve considered crafting mechanics to create different light sources, and maybe a roguelite gameplay loop where the lights you place have some persisting effects on your following run.