Separating events from framerate, and font issues.

Get help using Construct 2

Post » Mon Dec 07, 2015 11:50 pm

If the framerate dips below 10 fps then dt is capped at 0.1 so time passed won't be accurate. Usually you design your game to run much faster than 10fps so that isn't really an issue.

If you really must have it be correct with a framerate below 10 then you could use the wallclocktime expression.

Basically add this to the top of your event sheet, and then use mdt in place of dt everywhere else.

global number mdt=0
global number prevTime=0

every tick:
> set mdt to wallclocktime-prevTime
> set prevTime to wallclockTime
B
89
S
30
G
94
Posts: 5,152
Reputation: 62,940

Post » Tue Dec 08, 2015 12:33 pm

Thanks R0j0, helpful as always. All my issues are fixed.
B
5
Posts: 13
Reputation: 251

Previous

Return to How do I....?

Who is online

Users browsing this forum: COcatdog, ColombageEnPLS and 13 guests