Its weird cause while debugging with Webgl "Off" (With game running in canvas2D) I get the fps that I'm looking for (40-60) but the game will crash even tho not a whole lot is going on cpu wise (stays under 30%). The Blackberry Z10 comes with web gl integrated but if the game didn't crash so much in canvas 2D I would of just stuck with that because of the higher frame rate.
With webgl on I get about 18-20 fps the most but the frames are always jumping & dropping so its not consistent.
I'm testing on a BB 10 device, I think the low frame rate may have to do with the many global variables active while the layout runs. In the Auto Runner I'm having frame issues with, I'll use variables to account for the platforms speed and its color ( since tiled background don't have animation sequences I created my own way of changing platform colors as the player progresses in distance traveled.)
The global variables are always active and may be the reason for a high Draw Calls percent, so if I could use instance variables to account for things like platform speed & color that might help me improve the frame rate.
My Goal is to make an auto runner that gets 40+ fps and has accelerating platforms that's color changes as the total distance traveled increases. I've been able to do everything but get the 40+ fps WITH WEB GL ON. I'll try to convert as many global variables down to instance variables as possible and if I get any luck with that I will let yall know.