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.

DarkBASIC Professional Discussion / Loop speeds and timing

Author
Message
Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 22nd Mar 2011 10:53
Hi everybody,

I've been working on optimising my project to run on different computers (just bought a new one! ^^) but I noticed that on both computers the frame-rates where considerably different.

Now I've been told about 'decoupling' the program loop and I'm investigating that. Another thing I ran across is timer based movement and such.

Now I'm just guessing here, but timer based movement is basically movement code that gets updated through a variable that reads the time, instead of the computer's sync (refresh rate), right?

Now the questions: What would work better and what approach do you use?

Thanks!

Regards Sph!nx
http://www.mental-image.net
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 22nd Mar 2011 14:10
Have a look into the CometSYNC routine. VERY nice!

Malevolence: The Sword of Ahkranox
The infinite RPG
http://www.msoa-game.com
Non Sequitur M
17
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 22nd Mar 2011 20:36
I personally use the Matrix1 Utility by IanM. It has some great timer functions that can be used to stabilize frame rates across different platforms.

If life were like a box of chocolates, I'd know what I would get... The one that got dropped on the floor and put back in the box.

Iye nehvur yoose spehl chehk, ahn mie tippyng izz fiyne.

Login to post a reply

Server time is: 2026-07-17 13:57:35
Your offset time is: 2026-07-17 13:57:35