Darkness and Flashlight

  • 28 favourites

Attached Files

The following files have been attached to this tutorial:



6,172 visits, 9,498 views



This tutorial hasn't been translated.


This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Hello, Scirra Community !

In this tutorial, i will teach you how to make a dark place and a flashlight.

Preparing the scene

First, you will need a ground and a player.

(I added a ceiling to have a cave like scene)

Then edit their behaviours to have a platform behaviour on the player and a solid one on the ground.

The effect

Preparing the effect

You will need two layers : A "Game" layer ("Background" here) and a "Darkness" layer.

The Darkness layer has special properties that you must edit :

Make it work

On the Darkness layer, make a new Sprite, it will be the penumbra.

Then, on this layer, add another sprite, that will be the light.

And change it blend mode to "Destination Out"

Now make it follow the player with this easy event :

And you have it !

But you can add another light to have a better effect :

I hope you liked this tutorial ;)

You can download the .capx file to test it !


  • Order by
Want to leave a comment? Login or Register an account!