Page 3 of 3

Re: Interesting article about gravity in games

Posted: Fri Dec 21, 2012 1:14 am
by utunnels
I think that's the reason why many games have constant logical dt instead of making it fps related, that makes the algorithm simpler.
Though strange things would still happen if fps is really too low, for example, two sound samples play within a single frame when they should not. But that is the fault of the machine.

Re: Interesting article about gravity in games

Posted: Sat Dec 22, 2012 1:11 am
by verilog
Very nice demo, Roland, I love how you benchmark the different algorithms, very illustrative, thanks for sharing this! :3

Re: Interesting article about gravity in games

Posted: Mon Dec 24, 2012 11:57 am
by Roland_Yonaba
verilog wrote:Very nice demo, Roland, I love how you benchmark the different algorithms, very illustrative, thanks for sharing this! :3
You're very welcome, sir!

Re: Interesting article about gravity in games

Posted: Tue Dec 25, 2012 2:05 am
by holothurian
Roland for some reason when I run your demo I get every box working fine except the dark blue Verlet box, which never makes an appearance! Am I being silly or is something up?

Re: Interesting article about gravity in games

Posted: Tue Dec 25, 2012 4:05 pm
by Roland_Yonaba
holothurian wrote:Roland for some reason when I run your demo I get every box working fine except the dark blue Verlet box, which never makes an appearance! Am I being silly or is something up?
Hmm..
Try to change line 138 in main.lua:

Code: Select all

setFps(max_fps)
to this :

Code: Select all

setFps(limit_fps)
At start, framerate will be capped at 300 fps. Test and see what goes on, then reduce it progressively (with F key).

EDIT: Actually, it just works fine. Verlet is perfectly aligned with another box, that makes it invisble.
I am actually bringing some interesting changes to this, i'll post it soon, and also fix that little problem.

EDIT2: Just opened a new thread for that demo.