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 / Dark PHYSICS - constant simulation speed across various hardware ?

Author
Message
Juggernaut
12
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 11th Sep 2013 03:25
Hello,

Is there any way to make sure that Dark PHYSICS simulation will occur at the same speed across various hardware devoid of processor speed
and GPU speed ?

Using - SYNC 60 will only make the frame rate limit to 60 frames per second. But does that grantee physics simulation at constant speed
across various hardware devoid of processor speed
and GPU speed ?
Juggernaut
12
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 12th Sep 2013 05:32
35 views but no answer
Juggernaut
12
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 13th Sep 2013 12:55
55 Views ...... still no answer ....
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 19th Sep 2013 19:53
I have never used Dark Physics but I have looked through the documentation a long time ago. Look in the advanced section, I think there may be something on timing.

Juggernaut
12
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 22nd Sep 2013 03:39
Matty H: Thank you Sir.
Juggernaut
12
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 22nd Sep 2013 03:39
Does Dark dynamix take care of the timing thing automatically ?
Inflictive
14
Years of Service
User Offline
Joined: 16th Jun 2009
Location: Altis
Posted: 23rd Sep 2013 06:39 Edited at: 23rd Sep 2013 06:41
Yes it's simple. Lol.

This is basically how I do it:

`At the top of your code:

ITERATIONS_PER_SECOND=60.0 `increase this if it seems buggy, decrease for better performance
dyn set timing 1.0/ITERATIONS_PER_SECOND, ITERATIONS_PER_SECOND, 0

`Every loop:

ELAPSED=timer()-lasttimer
lasttimer=timer()
dyn simulate ELAPSED*0.001
dyn fetch results
dyn update



(both variables are floats)

Juggernaut
12
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 24th Sep 2013 00:31
Inflictive: Thank you very much for the code example.

Login to post a reply

Server time is: 2024-04-20 04:28:18
Your offset time is: 2024-04-20 04:28:18