rvizcaino Posted November 18, 2014 Share Posted November 18, 2014 Hi friends, I have this game http://rocketcarrot.brace.io, it runs at 60 FPS even in my old Dell PC from 2009, the problem is noticed when run in mobile, I have a Nexus 4 and the FPS is between 20-25 (Chrome Browser) and as low as 10 FPS on Firefox. I've also noticed the sound is very laggy especially on Firefox. I tried to change to CANVAS mode, but it look worse! Thank you so much! Link to comment Share on other sites More sharing options...
Sam Posted November 18, 2014 Share Posted November 18, 2014 Mobile Performance without a wrapper isn't as good as with it.since you have to optimize your game for playing on mobile a lot,one afford were to use something like cocoonJS for mobile - (appstore / google store / amazon store).I have spend a lot of time optimizing my gamecode to run smooth on even the iPad mini1 (which has not a lot of power)so it is possible. But since mobile-browsers are a lot slower than putting code into a native-wrapperI would recommend you to use some kind of wrapper-If you want your game to be accessible on browsers I think you have to do a lot of optimizationand of cause to skip some effects / heavy processes. :/Or someone has a better idea~(I can only report experiences from using native wrappers) Link to comment Share on other sites More sharing options...
Sam Posted November 18, 2014 Share Posted November 18, 2014 First post I was able to run the game via a wrapper (cocoonJS is one of the fastest) at 60fps on iPad mini with meanwhile a lot of sprites, audio, some collision, a few update processes.http://www.html5gamedevs.com/topic/8624-phaser-improve-mobile-performance/Summary of experiences on performance:http://www.html5gamedevs.com/topic/9931-mobile-performance-tips-tricks/ Link to comment Share on other sites More sharing options...
rvizcaino Posted November 18, 2014 Author Share Posted November 18, 2014 Hi friend, thanks for answer. I see u got to tweak so many things... My game has: One group for enemies (15 sprites).One group for enemy bullets (50 sprites)One group for player bullets (100 sprites)One group for parachutes (10 sprites)2 particle emitters for player engine Link to comment Share on other sites More sharing options...
rvizcaino Posted November 18, 2014 Author Share Posted November 18, 2014 Just for anyone interested, I've removed the 2 particle emitters for the player engine (smoke and fire) and now my game runs 60 FPS in mobile! Link to comment Share on other sites More sharing options...
valueerror Posted November 18, 2014 Share Posted November 18, 2014 particle emmiters are the ONE thing in my game that causes sudden framedrops.. i wonder how we could change this fact to the better (because particle emmiters are nice ^^) my particle emmiters occur on explosions or on picking up powerups .. they emmit only 10 particles at a time, fade away and are gone.. but still from 59 fps down to 40 when a particle emmiter is set to explode Link to comment Share on other sites More sharing options...
Sam Posted November 18, 2014 Share Posted November 18, 2014 - yes I'm serious about that particle-thing, but - hell - I've got no time :/in cocoonJS one single particle effect causes 10 less fps, regenerating slowly. @rvizcaino that's good. - performance also depends on the device. I'm using an ipad Mini (1) for the low end testing.You should always consider users which drive the highway with a bicycle.Okay you don not have to support he iPhone 1 and such devices, but test with the low end device that you want at least to support.What also causes a lot of frames were any use of bitmaps - generated content, backgrounds, fonts (around 10 fps more on mobile). Link to comment Share on other sites More sharing options...
Recommended Posts