• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

Simulate a light effect around a sprite (player, fire, explosion...).


GM Version: 2
Target Platform: all
Download: N/A
Links: https://ouzzgame.blogspot.com/2020/06/gmamemaker-studio-2-simulate-light.html

Capture d’écran 2020-06-23 à 22.48.26.png

Hi all!

This is a quick little tutorial about a visual effect that I like very much...

This light effect is a kind of hole into a dark surface over layers of your game.
This surface can be placed whereever you want: over all layers or between two layers.
You can set the darkness intensity with alpha between a value from 0 (no darkness) to 1 (totaly black).

We are going to create a light object associated to a sprite. This sprite is a simple white circle. But you can use an animated sprite.

Fig. 1 obj_playerLight

Fig. 2 obj_playerLight2

If you use a simple white circle, it would be interesting to make it animated by increasing and decreasing the radius with the function draw_sprite_ext.

>obj_playerLight: Create, Step and draw event....

Capture d’écran 2020-06-23 à 21.57.42.png

Capture d’écran 2020-06-23 à 21.57.54.png

Read more at https://ouzzgame.blogspot.com/2020/06/gmamemaker-studio-2-simulate-light.html