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 Classic Chat / simulation question

Author
Message
qwe
20
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 25th May 2013 22:32
i am simulating a group of particles and their gravity/electric forces on each other. however i don't know how to make it so that the timescale and unit scale are equivalent to (X) milliseconds (however long taht frame was) and (Y) meters (where each unit is one meter)?
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 25th May 2013 23:00
Set the time scale to milliseconds? What scale is it in now?

If I understand correctly, you want to step through using a time interval where the position of the particles update to a constant distance from its last step? If so, that could be difficult since the speed isn't constant due to acceleration.

"You're all wrong. You're all idiots." ~Fluffy Rabbit
wargasmic
17
Years of Service
User Offline
Joined: 15th Oct 2006
Location: UK
Posted: 27th May 2013 05:27 Edited at: 27th May 2013 05:51
http://gafferongames.com/game-physics/fix-your-timestep/

That's one of a collection of articles on the site. I have implemented this and 3d physics based on this article...

http://gafferongames.com/game-physics/physics-in-3d/

...into my own game engine and it seems to work nicely. The simulation runs exactly the same regardless of fps since the physics are updated how ever many times is needed per frame and the RK4 integration allows time based movement.

Edit: I'm using tier 2 but maybe you can implement the same kind of thing in tier one.

Another resource here http://gamedev.tutsplus.com/tutorials/implementation/simulate-fabric-and-ragdolls-with-simple-verlet-integration/

Another Edit: Simulation loop for my project

Login to post a reply

Server time is: 2024-05-04 13:57:05
Your offset time is: 2024-05-04 13:57:05