Focus only on the player

Hello, I want to know if there is a way to make my character walk around him and he is in black and that the player is only seen when he advances, he sees the rest, is it possible to do that or is it with animation and layers?

I did not understand any of that.

something like this I want everything to be dark except my character

Yes, it’s possible.
I was told it works like that:


Create a mask object… like a sprite that is a big black rectangle with a transparent hole in the middle, then move that masking object every frame to be centered on the player.

1 Like

I went ahead and did this for fun:

Key Points:
Make sure the hole in the spotlight sprite is in the center
Create the spotlight sprite in it’s own layer
Change the width/heighth of the spotlight sprite to be twice the Scene size to ensure complete blocking
Center the spotlight on the player
Move the spotlight layer in the same way as the base player

You can probably use layer effects and fancy sprite work to give a glow effect instead of just a “hole” of light. There is probably a way to do this with just a camera algorithm instead of moving a huge sprite around… but this works.