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

Post 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.
User avatar
verilog
Citizen
Posts: 97
Joined: Thu Nov 03, 2011 3:15 am
Contact:

Re: Interesting article about gravity in games

Post by verilog »

Very nice demo, Roland, I love how you benchmark the different algorithms, very illustrative, thanks for sharing this! :3
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: Interesting article about gravity in games

Post 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!
holothurian
Prole
Posts: 22
Joined: Sat Dec 22, 2012 11:59 pm

Re: Interesting article about gravity in games

Post 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?
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: Interesting article about gravity in games

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Majestic-12 [Bot] and 3 guests