## Interesting article about gravity in games

General discussion about LÖVE, Lua, game development, puns, and unicorns.
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

### Re: Interesting article about gravity in games

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.

verilog
Citizen
Posts: 97
Joined: Thu Nov 03, 2011 3:15 am
Contact:

### Re: Interesting article about gravity in games

Very nice demo, Roland, I love how you benchmark the different algorithms, very illustrative, thanks for sharing this!

Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Contact:

### Re: Interesting article about gravity in games

verilog wrote:Very nice demo, Roland, I love how you benchmark the different algorithms, very illustrative, thanks for sharing this!
You're very welcome, sir!

holothurian
Prole
Posts: 22
Joined: Sat Dec 22, 2012 11:59 pm

### Re: Interesting article about gravity in games

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?

Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Contact:

### Re: Interesting article about gravity in games

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.

### Who is online

Users browsing this forum: No registered users and 44 guests