JakeCake Posted June 28, 2014 Share Posted June 28, 2014 Hello, yes I'm new here I hope, even though this has as much to do with CocoonJS than with Phaser, that the question is still welcome and that somewhat have been in the same situation. I am a few weeks into a project and decided to test it on my Android Device (Samsung Galaxy S3 - mini). To my surprise the game only ran at about 3 FPS. It is a somewhat graphic-intensive game, but still. After fiddling around in the settings for a while I tried to disable WebGL and rely on pure canvas/software rendering. This made the FPS jump to about 25, which is somewhat acceptable, but from the tests I've heard, if the game can run in 25 FPS in canvas-mode, it should be able to run at about the double in WebGL-mode, so there is clearly something wrong. When running in WebGL-mode, in addition the terrible FPS, there seems to be some graphical artefacts as well. I have worked in OpenGL before, and know that even a single error can destroy performance for the entire game, so it points toward some error in the OpenGL-ES. Problem is that the debugger in CocoonJS doesn't report any Errors, and the few Warnings has nothing to do with graphics, only inputs. Is there some known bug with Phaser or Pixi.js, because my next step would be to to disable parts of my game to see if that is what causes the problem, which is going to be a very tedious process. The features that I am using that might be a cause of problem: - Crop() there were something about it in this thread, but it seems outdated, i might be wrong though - 2048x2048 texture-size (All modern devices should support this) - Tint() though very sparingly - I am using Phaser 2.0.4 - I am using CocoonJS Launch App 2.0.1 for Android I really hope someone can help out with a solution or a way to help the debug-process of this problem. Link to comment Share on other sites More sharing options...
JakeCake Posted June 29, 2014 Author Share Posted June 29, 2014 So after some more research it seems that this is a somewhat known issue, and at the moment (29-June 2014) using WebGL is a no-go as CocoonJS has some problems managing textures, which leads to some GL errors, which leads to very poor performance in WebGL mode. In my own project I did manage to raise the frame-rate in WebGL mode from 3FPS to ~20FPS, and in Canvas mode from 25FPS to ~55FPS by removing all "game.debug.text()". Apparently there is an issue with PIXI's rendering of text in CocoonJS. Even a single line of text can half your frame-rate, in an otherwise complex scene. So for anyone else out there, just disable all text-rendering and render without WebGL for now. I have faith that Phaser 2.0.6 will fix some of the issues, and eventually WebGL will be viable in CocoonJS. Tom W Hall and lukaMis 2 Link to comment Share on other sites More sharing options...
Recommended Posts