Performance & Timer

Get help using Construct 2

Post » Sat Feb 15, 2014 3:19 am

Hello.

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.


Edit:

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
B
10
S
2
Posts: 135
Reputation: 1,090

Post » Sat Feb 15, 2014 5:03 am

You might find this article useful:

https://www.scirra.com/tutorials/67/delta-time-and-framerate-independence
There are 10 types of people in the World, those that understand binary and those who don't.
B
7
S
2
Posts: 93
Reputation: 797

Post » Sat Feb 15, 2014 6:04 am

Awesome. Exactly what I need. Thank you.
B
10
S
2
Posts: 135
Reputation: 1,090


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], Yahoo [Bot] and 46 guests