How to make a "light" follow a character in a dark level?

I’m a teacher and one of my students wants to make a top-down game where the main character is in a cave and the cave will be dark, but the character is holding a torch and when they move an illuminated radius follows the character.

Hi @MrVargas,
I suggest adding darkness to the objects that are farther away from the player by using the colors behavior.

I have an example that shows how to do this:


@MrVargas - Another approach that isn’t nearly as flexible & nice, but probably simpler to implement is to cover the screen with a large “darkness” object that has a hole in it representing the “light”. Just scale the darkness object up and position it over the player, like this:

1 Like

You could add a sprite (a very big one) that has a hole in the center of it, and attach it to the player.