How do I make 1 minute always last 1 minute

Get help using Construct 2

Post » Tue Mar 11, 2014 9:41 am

I agree that in 99.9% of cases adding dt every tick to a counter will give you an accurate time - but , if I understand it correctly, if your fps drops below 10 fps then dt will not work any more as dt is not allowed to go above 0.1 so your timer will start to slow. I don't think very low fps affects the time/wallclock ?
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Tue Mar 11, 2014 3:29 pm

I love your implementation Yann, im going to use that, with an added control to pause the game if the fps drops below 10, as RamPackWobble said dt will not go below 0.1 and i think there is where the problem is.

I have to read the manual about the system functions of C2, i didn't know some of those even existed.

vtrix, yeah i think most are cheating, maybe using something like cheat engine to modifiy the timers or just stop the clock.

For the next implementation i'm going to do some research on ways to prevent that, i already have a lot of security measures in place to avoid "fake" post request to the server, currently the scores and all sensitive data is encoded in AES256 before it gets send to the server and the score is "masked" behind a few maths operations.

Thanks everyone, especially Jann and RamPackWobble!
Great community support as always.
B
15
S
1
G
1
Posts: 15
Reputation: 1,051

Post » Tue Mar 11, 2014 10:07 pm

@RamPackWobble you do have a point here, I noticed going through c2's javascript that dt was clamped to 0.1
It's a common technique to avoid object teleportation. But yeah in sinneruy's specific case it might be detrimental.

I modified the capx to compute my own dt using wallclocktime. It should counter this issue.

hiddenObjectClock.capx
B
68
S
22
G
14
Posts: 1,485
Reputation: 16,561

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests