• Register

Demons with Shotguns is a competitive platformer featuring old school, fast paced, twitch style arena shooting action where you battle for the souls of your friends!

Post news Report RSS Death Hides in the Shadows

Dynamic lighting has been added to Demons with Shotguns. See how we're making use of the new system.

Posted by on

I've always wanted to explore the possibility of having a dynamic lighting system in Demons with Shotguns. I felt this could really add a whole new layer of depth and dynamism to the game, while allowing some cool level mechanics as well. Now that the game was upgraded to Unity 5, I felt this was a good time to finally delve into this.

One of the first things you need to do to enable dynamic lighting is to generate normal maps for all of your textures, so that the textures know how to react to light and be lit accordingly. I'm using the excellent 2D Toolkit framework, which allows you to effortlessly generate normals for your sprite collections, so thankfully this was a painless process. 2D Toolkit also comes bundle with a set of lit shaders to be applied to your textures, so one less thing that I had to do!

With that bit of labor out of the way, I was able to explore adding lights to the game's arenas. Here are some examples.

One note though, for some reason, I was having a hard time effectively capturing some of these new effects with a GIF recorder (odd artifacts kept coming up) so I'm just going to post videos as well.

I started with adding a nice dusk to night transition to the Metro arenas. A match starts out at dusk, with the sky and buildings emitting a nice pink/purple color.

With the use of a pinkish directional light, I was able to intensify (though without being over bearing) the mood of match.

This slowly starts to fade out to darkness, transitioning the buildings to a nighttime blue color.

You'll notice the street lamps (yes, I know it doesn't make sense for a street lamp to be on a rooftop, they're place holders for now :p) using a spotlight to illuminate their immediate area, which also flickers, giving a sense of decay to the city.

Here's another Metro example of a street level arena, with street lamps and interior lighting.

If there's a bloody gun fight happening on the roof tops of a bustling city, someone is sure to notice. Here's a video of Metro06 which has police spotlights highlighting the battle above. This video also shows off the dusk to night transition.

The Cemetery arenas take place during a massive thunderstorm. As you can guess, this is a great opportunity to take advantage of some dynamic lighting. Here's a video of a thunderstorm that rolls in during fighting.

It's important to note that not every arena will have dramatic effects like this. For the most part, the effects are very subtle. I didn't want to get carried away with them and have them be overbearing. They're a special effect, and should be used sparingly.

For example, here's a Hell match which doesn't have any crazy lighting effects, but still makes subtle use of mood lighting and point lights for certain items and events like capturing a soul and teleporting.

Next post, I want to talk about how we've redesigned the Soul Reaping game mode a bit. Stay tuned!

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: