Jump to content

Shrinking light effect


Coicatak
 Share

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 :)

post-10756-0-47820400-1411391286.jpg

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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