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.

iOS and MacOS / device independent speed

Author
Message
joachim
10
Years of Service
User Offline
Joined: 21st Feb 2012
Location: Vancouver Canada
Posted: 1st Mar 2013 19:59
Hi All,

I'm trying to slow down a moving Sprite,
and would like to have it device independent.

I don't see a "wait_for_milliseconds" function or
anything in this direction.

Does anybody know how to do it ?

thanks
and cheers
Joachim
Ancient Lady
Valued Member
18
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 1st Mar 2013 21:14
There has been discussion about getting the timing the same on all devices.

Typically, it comes down to using the GetFrameTime() command to adjust the timing of things. It returns the actual time used by the last frame and you use it to adjust physics and other movements. The StepPhysics(time#) command will make appear to make physics happen at a consistent time based on actual device time.

Other ways are used for when you manually change position. Like using things like (actualtime#/desiredtime#)*(desiredxmove#) to set the amount actually moved.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2022-09-25 22:28:10
Your offset time is: 2022-09-25 22:28:10