Coicatak Posted September 22, 2014 Share Posted September 22, 2014 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 More sharing options...
lewster32 Posted September 22, 2014 Share Posted September 22, 2014 This should be a good starting point for you: http://gamemechanicexplorer.com/#lighting-2 Link to comment Share on other sites More sharing options...
Coicatak Posted September 22, 2014 Author Share Posted September 22, 2014 Wow quick answer! This link is awesome, I'm new to game dev so this will help a lot. I'll try to make it work and come back here if I don't manage to. Thank you! Edit: Works wonders, thanks again lewster32 1 Link to comment Share on other sites More sharing options...
Recommended Posts