Very poor performance with physics and CocoonJs

0 favourites
From the Asset Store
Firebase: Analytics, Dynamic Links, Remote Config, Performance, Crashlytics on Android, iOS & Web Browser
  • Have someone tried to export the simple physics catapult example to CocoonJs? I tried and the results disappoint me... tested on iPhone 4 and iPad 2, it begins with 55 fps (cool) but When i Touch the pig, all slow down to 4/5 fps.

    I test another physics game i made, a Ragdoll with 12 parts put together, the big part was 12x10 pixel, Very small. The result was that When the Ragdoll begin to fall, with only floor on the screen and a restart button, the results was the same as above, 4/5 fps.

    So, if u are planning to make an Angry Birds clone, u can't put it on any smartphone or tablet but only on pc (on the pc the fps was 60 fps, perfect).

    I'm a big fan of C2 and I love it, but I Think this is a Very limitation for Who, like me, Wanna create a physics game not only for the Chrome store...

    Haven't try the AppMobi, if someone would like to try and tell the results...

  • That's very interesting. I haven't tried much, but my 5 bouncing balls get's 60fps consistently.

    However that's consitently not always. On rare occasions I would get a hiccup and it would drop to 20 or less fps for just a moment.

    This was on iPad2 IOS6 and iPod Touch 3g IOS5.

    so there might be something very specific going on that causes this drop.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm not sure if c2 supports cocoonjs's new physics acceleration yet or not. Have you tried the demo that comes with the launcher?

  • jayderyu: I have iOS 5.0.1 but I don't think is that the problem. I noticed that with 4 or 5 small physics elements the performance are ok. if u can, test the catapult example on ur ipad2 ios6. You have only to export without any modification because is already touch.

    Arima: Today i'll try and will post the results, tx for the info. I don't knew there was this new function and demo. EDIT: where should be this demo tutorial? I just open C2, New project, and the only CocoonJS project is the standard with the CocoonJSAds object... I cannot find any new physics acceleration. <img src="smileys/smiley5.gif" border="0" align="middle" />

  • The demo is in the cocoonjs launcher itself - the first screen says demos, then select the box2d demo.

  • Ah ok, sure! I try it and it run Very Very fast! On iPad 2, I added 180 objects / rocks and is still 62 fps! With 300 obj is "playable", 30 fps. I think 300 obj on the screen is a Very large number! Angry Birds use at last 100/150 small object on the screen. So, Why with 12 obj and some joints to make a ragdoll, When i export the project for CocoonJs it runs slowly? There's no implementation between C2 and Ludei's product? C2 is not yet implemented to use Box2D function?

    Hope Ashley or Ludei can answer this important question.

    Physics are Very cool to use, on C2 works very well, on CocoonJs works very well... But together don't work fine.

  • The acceleration for physics is very new in cocoonjs, and I think scirra just hasn't updated c2 to use it yet - they're very busy at the moment.

  • I hope they can resolve this problem. I like physics and ragdoll! <img src="smileys/smiley1.gif" border="0" align="middle" />

    Thanx Arima for all ur answers! I'll proceed with my project for the pc for now, implementing the touch object because I believe in Scirra! <img src="smileys/smiley10.gif" border="0" align="middle" />

  • Hi guys!

    Ok, a bit late here, but I think all this needs a bit of explaining on our part.

    The Box2D extension is still quite incomplete in the last version we released, so there are several things that don't work yet. Contact listeners are missing, fixture support is incomplete, etc. We're working on improving support for all these things, but for the moment I'm afraid you'll have to wait, as making Construct support every feature of Box2D in CocoonJS would take an enormous effort from Scirra.

    We hope to get that extension to a point where integration into Construct will take a few seconds, but for the moment it's not complete enough for that. We'll keep working, though.

    You can take a look at how we're doing in our extensions repo here: bitbucket.org/ludei/cocoon_cocoonjsextensions

    (Please note that only the "master" branch will work with the released version of CocoonJS)

  • Yep, thanx for the reply! I'm not a programmer, but all this seems a little complex.

    So, good work to all! <img src="smileys/smiley2.gif" border="0" align="middle" />

  • I know you guys are working hard on this, but here's some more test data.

    I ran the cocoonjs box2d demo on my 5 year old android (droid incredible 1GZ - 512MB - android version 2.3.4) and get a solid 40 fps when adding 60 of those asteroid objects.

    Next I ran the construct 2 Angrybirds demo - it got down to 2 fps.

    A simple ball and ground gave me about 20 fps.

    I hope some progress is made on this topic.

    Keep up the good work!

  • I created a quick, very low profile physics demo and exported to both appMobi and CocoonJS. This is just a bird's eye view of a large object moving about 20 small objects along a tiled background. That's it.

    To my disappointment, the frame rates were horrid on both frameworks on a 3rd generation iPad. I've cancelled this project, since it would be unplayable on the device I targeted it for. Sorry, but both CocoonJS and appMobi render physics games on Construct 2 for any mobile devices worthless.

  • AhemExcuseMe - hardware acceleration for physics has not been completed yet. When it is, the speed of physics through cocoonjs should be much, much faster (try the demo that comes with cocoonjs to get an idea).

  • Arima, thanks for the info! Do you have an idea of when this will be ready? I'm assuming hardware acceleration is browser specific for desktop apps and native across all tablets?

  • Hardware acceleration for physics is only a part of cocoonjs (iOS and android). Ludei hasn't announced when it will be done yet, but they're working on it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)