Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

9 years ago by UteEffacht

Hey,

I found my game running at a framerate of < 10fps on the iPad1. After temporarily removing nearly the whole game (all maps, etc) I got it up to about 18fps. While drawing time and entity checks are below 1ms and entity update (about 2ms) its only the system lag (about 40ms) which completely kills the performance.

Now my question is: is there really nothing I can do about the system lag? Is it really only the performance of the device / browser, indepandant from the application itself?

Thanks for any hints!

9 years ago by alexandre

Yes. Better performance is achieved by going canvas-native, with iOSImpact, AppMobi, CocoonJS, and the like. Good overview of mobile impact in this section of the docs.

9 years ago by DavidWeber

If your willing to go through the effort and work around the caveats then check out appMobi's direct canvas.

I've gotten great performance on my iPad2 with direct canvas.

Tutorial: http://www.pointofimpactjs.com/tutorials/view/12/how-to-convert-impactjs-games-to-appmobi-directcanvas

9 years ago by UteEffacht

Thanks guys! That's what I really appreciate in the impact community: no RTFM-comments, but kind hints even though I could have found it out by myself.

9 years ago by DavidWeber

No problem.

I'm targeting android as well so iOSImpact was not an option for me.
As for CocoonJS when I tried it, the demos on the launcher failed on my galaxy tab, never tried on my iPad2. So I went with appMobi, and it runs great in the browser and on my iPad2. But if you do go with CocoonJS please let us know how it goes.

With regards to appMobi I am struggling to get it to work right on my galaxy tab though. But once I have it all figured out, I'll probably write a post about what all is required for converting from impactJS to appMobi on my blog: http://dpweberza.tumblr.com/

Good luck!

9 years ago by Philip

Most of the time you produce to much garbage. That needs to be collected and makes your system lag.

Two good articles about reducing garbage:

http://www.scirra.com/blog/76/how-to-write-low-garbage-real-time-javascript
http://blog.tojicode.com/2012/03/javascript-memory-optimization-and.html

It's a bit weird to worry about memory in javascript, but if you want to write fast code, thats a good starting point.
Page 1 of 1
« first « previous next › last »