Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Shrinking light effect


Recommended Posts

Hi all,


I'm just getting started with Phaser and managed to create a simple game. Let's just say you control a fish in the ocean, that the camera follows.

I'm trying to create an effect and I don't know where to begin.


I need to darken the game around the fish, as if the fish was the light source and it was becoming less powerful, therefore having a smaller light radius. I attached an image that illustrates what I need.


I think I need to create a black rectangle and apply an alpha mask attached to the fish sprite or something but even by reading the BitmapData API documentation I really don't know what to do.


Any help is appreciated :)


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...