The time in the game is different if the mobile is less pote

Discussion and feedback on Construct 2

Post » Tue Jan 20, 2015 2:18 pm

Hello.
I have almost finished my first game Construct 2 , but when testing it on different mobile ( with different power ) , game time is different.

On a mission that lasts 1 minute , on a less powerful mobile becomes more longer.

I understand that I can go slower in this mobile, but is there any way that timers go real in all mobile?

Thanks
B
4
S
1
Posts: 25
Reputation: 400

Post » Tue Jan 20, 2015 2:37 pm

Hello, if you didn't know about it, my first guess is Delta time :

https://www.scirra.com/tutorials/67/del ... dependence

Does that help ?
... "Je suis CHARLIE" ...
B
30
S
6
G
2
Posts: 43
Reputation: 2,075

Post » Tue Jan 20, 2015 3:04 pm

Thanks softoulu,

my problem is in this image

in a slow mobile takes longer than a powerful mobile
You do not have the required permissions to view the files attached to this post.
B
4
S
1
Posts: 25
Reputation: 400

Post » Tue Jan 20, 2015 3:15 pm

Very bad form to use every 0.01 seconds - do read that dt tutorial and implement it (Every tick - progress bar + dt * something) and it will work correctly.
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Tue Jan 20, 2015 4:02 pm

Use wallclock

there are those of us know that dt isn't reliable. Heck some people have written very nice long examples as to why jumps are shorter on mobile than they are on desktop. Due to the time instability.

Start
end time = Wallclock + 1 minute

everytick
if wallclock > end time then timer over


though, just remember to account for pausing.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,038

Post » Tue Jan 20, 2015 4:27 pm

Also, if a similar structure is used anywhere else ("every x seconds..." with very short time steps), they should be converted to dt logic as well, otherwise the game is likely to have some imbalanced elements depending on platform performance (shooting faster/slower, moving faster/slower, etc.)

Few things should run at fixed timesteps, if any, and these should always be at a lower frequency than the minimum game framerate to guarantee you don't accumulate delays and errors.
Image
Game Producer & Independent Developer - http://raphaelgervaise.com
B
24
S
9
Posts: 237
Reputation: 2,232

Post » Tue Jan 20, 2015 4:57 pm

Thanks!!

I work with DT
B
4
S
1
Posts: 25
Reputation: 400

Post » Tue Jan 20, 2015 11:32 pm

@arrasia I recommend reading this to learn how to properly use dt https://www.scirra.com/tutorials/67/del ... dependence
B
42
S
17
G
2
Posts: 850
Reputation: 6,209


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests