Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Using Timer() never triggers on fractions of a second...

Author
Message
RoadKill
1
Years of Service
User Offline
Joined: 22nd Apr 2022
Location:
Posted: 7th May 2022 01:55
I'm finding my experience with AppGameKit Studio Tier 1 language a frustrating mess when timers are involved.

I've managed to use GetFrameTime() for my delta when it comes to movements so I'm happy as it works as intended but the big issue is if I want to make a timer for counting tenths of a second or hundredths of a second I just can't figure it out.

I'm not great at maths but I'm sure that at least one of the below example of what I've tried should have triggered at least once if the timer worked as it should be,

I've tried something like


The above are just a few of the things I've tried, most likely they are the wrong ways of doing it but I'm finding the built in timer() function is just completely useless for what I'm doing.

Does anyone know of a way of dealing with fractions of a second so I can get back to what I was doing.

Also is trying to use tier 2 a viable solution?
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 7th May 2022 03:38 Edited at: 7th May 2022 03:38
thiis post might help: https://forum.thegamecreators.com/thread/219869

combined for your convenience (and my testing ):
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 7th May 2022 16:53 Edited at: 7th May 2022 17:10
this might also be helpful:


note the 1/100ths lagging behind when refresh rate is capped.

ie, we are only INCing Hundredths by 1 where more that 1x1/100th has passed (your and my examples aren't accounting for that?).

Login to post a reply

Server time is: 2024-03-29 13:58:45
Your offset time is: 2024-03-29 13:58:45