BdR Posted July 19, 2014 Share Posted July 19, 2014 Hi all, in the CocoonJS launcher I get 30 frames per second, but I read on the forum here that CocoonJS should give 60fps (see here or here). I launch my test app in the CocoonJS launcher with a URL and Canvas+. Am I doing something wrong here or is a difference between the launcher and the cloud compiler? I've been looking at CocoonJS lately and I made a test app. It's a bare minimum test just to check out how the CocoonJS launcher works and what the performance is. See my test script here, you can tap the bottom bar to add/remove sprites:http://members.home.nl/bas.de.reuver/cocoonjs/ My frames per second testing, for 1-200-500 balls (mobile device is HTC Desire X, Android 4.1.1)desktop chrome: (1)60fps - (200)60fps - (500)60fpsmobile chrome: (1)39fps - (200)31fps - (500)19fpsmobile default browser: (1)40fps - (200)19fps - (500)11fpsCocoonjs launcher: (1)30fps - (200)28fps - (500)25fps Quote Link to comment Share on other sites More sharing options...
BdR Posted July 20, 2014 Author Share Posted July 20, 2014 I tried compiling my test app in the CocoonJS cloud service and then it runs slightly better than from the launcher app. CocoonJS cloud compiler: 1ball=39fps - 200balls=35fps - 500balls=30fps Quote Link to comment Share on other sites More sharing options...
Ludei Posted July 21, 2014 Share Posted July 21, 2014 Hey Bdr What Device are you using? Because I get 60fps in my Nexus 4. Quote Link to comment Share on other sites More sharing options...
korgoth Posted July 21, 2014 Share Posted July 21, 2014 Hello, my phone is an LG Optimus Black: Cocoonjs launcher: (1)45fps - (200)30fps - (500)21fps Imho you need a phone less than 1-2 years old to get good results with cocoonjs. Quote Link to comment Share on other sites More sharing options...
balazsdavid987 Posted July 22, 2014 Share Posted July 22, 2014 I've tested "bouncing ball" with the CocoonJS launcher on a Samsung Galaxy Tab4. The results are: Canvas+: constant 60fps, it starts to slightly drop after 650 balls.WebView+ and WebView: varying 50-60 fps, it significantly drops after 125 balls, 15fps with 650 balls Quote Link to comment Share on other sites More sharing options...
jamessimo Posted July 23, 2014 Share Posted July 23, 2014 If you want to test this more, have you tired not using textures on your balls? in this issue i posted here http://www.html5gamedevs.com/topic/7123-cocoonjs-images-and-screen-resolution/I lost almost 25 FPS due to a single static image. I fixed the issue by lowering the game res but still this is very strange. Quote Link to comment Share on other sites More sharing options...
BdR Posted July 27, 2014 Author Share Posted July 27, 2014 Thanks all for testing Confirms what I suspected, like korgoth said; CocoonJS needs a relatively new Android phone to run at 60fps, so phones manufactured in about last 1-2 years. If you want to test this more, have you tired not using textures on your balls? in this issue i posted here http://www.html5gamedevs.com/topic/7123-cocoonjs-images-and-screen-resolution/I lost almost 25 FPS due to a single static image. I fixed the issue by lowering the game res but still this is very strange. Actually the balls are not 3D models with textures, it's just 64x64 pixel sprites taken from a 64x512 spritesheet, see spritesheet below. Quote Link to comment Share on other sites More sharing options...
Ezelia Posted July 27, 2014 Share Posted July 27, 2014 there is maybe a small optimisation you can add. instead of thisballdemo.cvs = document.createElement("canvas");use thisballdemo.cvs = document.createElement(navigator.isCocoonJS ? 'screencanvas' : 'canvas'); Quote Link to comment Share on other sites More sharing options...
jamessimo Posted August 12, 2014 Share Posted August 12, 2014 Actually the balls are not 3D models with textures, it's just 64x64 pixel sprites taken from a 64x512 spritesheet, see spritesheet below. What I ment was, if you make the balls with javascript and color them in instead of using sprites it may give you better performance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.