Easy Lighting Extension for Game Maker

One thing I’ve picked up on by reading developer’s forums and various articles on the Internet is that while Game Maker can do almost everything you could want it to, it doesn’t necessarily do it well.

I noticed this myself during my last Game Maker creation when it came to audio. Despite the fact that it gives you the option to use .mp3 format audio, it turns out that it doesn’t support most types of .mp3 (or some such nonsense.) I ended up using some hefty .wav files, which Game Maker compressed during the gameplay and completely changed. The majority of my sound effects seemed to sound like static! This is why people with the technological know-how have stepped in to save non-programmers by providing downloadable extension software for GM, including several which improve audio handling, which seems to be GM’s lowest point.

When it comes to in-game lighting, I’ve previously found ways to cheat by overlaying semi-opaque objects on top of light-emitting objects. In Somnium I used this to make some objects appear to glow, however this ultimately had no effect on the game’s lighting on the whole. The image above is an example of an extension called EasyLighting V7.0.2, which handles light generation in Game Maker. It is the same extension which Gabriel Verdon uses to create his moody, atmospheric lights in The Archer.

As you can see from the top example, there are two types of light generated. One is a dim, yellowish light and the other is a bright white light which casts shadows off the objects around it. Both of these lights use the same sprite image, which is a circle shape with a radial gradient. This is similar to my previous lighting “objects”.

However, the extension settings are used to draw these sprites to certain specifications, rather than simply overlay the same image in the same way repeatedly. This reduces the amount of sprites and used, and helps game performance.
You can read an in-depth description of all the extension’s functions in this tutorial here, which also runs through how the extension works and how to implement it!

The advantages of using a lighting system like this one is that it can help create the game’s desired atmosphere. The lights work by first applying a colour overlay, which immediately changes the tone of the game. Each light then has its own individual colour and brightness, which can give a really good sense of light and dark in the game.

To test the extension, I made some street-light style lights in the Grandma Engine. I recorded a quick little demo of the lights in action so you can see how effective they are in changing the ambience of a room. I’ve tried to capture the difference in the colour of the character (square) when under and away from a light source. These lights worked especially well at highlighting objects when several were placed close together.

2 responses

    • Sorry, that was some crappy HTMLing! I’m afraid I can’t help you though because Gabriel Verdon has removed his old blog and the tutorial along with it. You might be able to get in touch with him and request it be brought back to life, because it was really great:


      In the mean time I’ll try to remember roughly what it said and put some advice up. If there’s anything specific you want to know then just let me know!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s