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.

Dark Physics & Dark A.I. & Dark Dynamix / How to manage frame rate and physics speed?

Author
Message
ale870
17
Years of Service
User Offline
Joined: 17th Jan 2007
Location:
Posted: 12th Jan 2009 00:57
Hello,

I made a function to get a very good constant frame rate (I calculate a delay using windows api QueryPerformanceCounter() and QueryPerformanceFrequency(). So now I have 60 FPS.
Now the problem is I'm using DarkPhysics, and it seems that if I delay the program to fit 60fps, physics objects go as a "replay".
I think there should be a method to setup internal physics timer, or similar thing.
How can I do it? I want good physics (fast) at 60fps.

Thank you for your help.

--Alessandro
ale870
17
Years of Service
User Offline
Joined: 17th Jan 2007
Location:
Posted: 12th Jan 2009 02:10
New info:

I tried to use the function "phy set auto fixed timing" but seems that I'm walking on the moon! Gravity seems very low, and general movement go slowly.

--Alessandro
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 12th Jan 2009 15:16
Try to put this in your main loop.
ale870
17
Years of Service
User Offline
Joined: 17th Jan 2007
Location:
Posted: 12th Jan 2009 22:59
Thank you for the suggestion, it worked perfectly!
You saved my game!

--Alessandro

Login to post a reply

Server time is: 2024-11-24 18:53:55
Your offset time is: 2024-11-24 18:53:55