My game is almost finished and I’m trying several ways to deal with light effect in my game, my focus is for Android, so I need optimization.
I don’t want shadows or complex light effect, I only want a circle light with fade in the corner to position in different places (chandelier, table lamp, lamp post…)
I’m just following these tutorials:
- Shaders: https://github.com/mattdesl/lwjgl-basics/wiki/ShaderLesson6
- Shader + mask: http://www.alcove-games.com/opengl-es-2-tutorials/lightmap-shader-fire-effect-glsl/
- Mask with framebuffer: http://techblog.orangepixel.net/2015/07/shine-a-light-on-it/
Testing 10 lights in my screen (and one following the character), works perfectly in desktop version, testing without vsync and FPS Lock I have something like 3500-4500FPS.
Testing the same thing in different Android devices, the game run almost smooth, when I have more than 7-8 lights in the screen and moving the character I have some 15-30FPS drop.
So, what is the best and optmized way to make simple circle light effect for 2D Android Games? I’m also curious to understand how various games on google play have so many lights at the same time without drop frames.
Note: I have a ‘test project’ without all my game logic (map, enemies, weapons…), so I can test more precisely.