Page 1 of 1

Performance & Timer

PostPosted: Sat Feb 15, 2014 3:19 am
by Alyra Games

After i tested my game for the first time on my galaxy note 1, I noticed, that the timer goes weird.

I have a timer, which creates an object every 1.5 seconds. On my smartphone it creates that object around every 1 second. It doesnt sound like a big problem, but it makes the game unplayable (platformer).

The second thing i wonder about is that the game stays at around 28-29 fps. Regardles what I do. I even deletet all objects, all layers, the whole event sheet. Then the fps where about 30.000+. But if I just place a small 64x64 sprite without behaviors, without code, just place it on the layout, the fps keep getting back to 28-29.

I use CocoonJS. Do smartphones have a frame limiter?

Thanks in advance.


Okay I managed to get the timing to work. It seems, that the timer is depending on the fps, which is not ideal, I find. I now use a global variable instead in the every tick event.Alyra Games2014-02-15 03:52:26

Re: Performance & Timer

PostPosted: Sat Feb 15, 2014 5:03 am
by Bertie Booster
You might find this article useful:

Re: Performance & Timer

PostPosted: Sat Feb 15, 2014 6:04 am
by Alyra Games
Awesome. Exactly what I need. Thank you.