News for hackers. Stuff that matters.
Re:Verlet-js - Open source dynamic body physics engine by donpark on Saturday April 20, 2013 @03:32AM (#5580677)
There is a similar project named Coffee-Physics [1] by Soulwire.

[1] https://github.com/soulwire/Coffee-Physics

Re:Verlet-js - Open source dynamic body physics engine by Ygg2 on Saturday April 20, 2013 @05:17AM (#5580853)
Interesting list but I wonder how do these libraries fare when used by JS developers? What are their performances and experience with them?
Re:Verlet-js - Open source dynamic body physics engine by seanmcdirmid on Saturday April 20, 2013 @06:41AM (#5580995)
Also, a verlet-based physics engine is a very different beast compared to a rigid-body one (a few in the list above are also based on verlet, but not most).
Re:Verlet-js - Open source dynamic body physics engine by jjoonathan on Saturday April 20, 2013 @10:39AM (#5581535)
Err, I thought verlet was just an integration technique? How does it translate into a "very different beast"?
Re:Verlet-js - Open source dynamic body physics engine by bm1362 on Saturday April 20, 2013 @10:53AM (#5581562)
Verlet integration uses an object's change in position at time t to determine the velocity for t+1- it is typically used for particles not full rigid bodies.
Re:Verlet-js - Open source dynamic body physics engine by seanmcdirmid on Saturday April 20, 2013 @11:05AM (#5581601)
Verlet is incredibly stable and allows you to update the position of a mass directly (velocity, force, momentum are all implicit), making it very easy to work with if not very accurate. You can't emulate rigid bodies very well (shape matching kinda works), collision response and stacking is a pain in the ass.
Re:Verlet-js - Open source dynamic body physics engine by jjoonathan on Saturday April 20, 2013 @02:33PM (#5582346)
I guess I'm still having trouble understanding where the complexities arise. I have no difficulty believing that they do arise, but I would like to understand how it happens if you're willing to take the time to explain.

I would think that rigid bodies -- either perfectly rigid or semi-rigid via springs & struts -- would not handle all that differently in verlet since force is explicit (typo on your part?) and a v/p estimate is available from the last position, albeit with a bit more phase lag than usual. Does the phase lag induce nasty oscillations or something?

Re:Verlet-js - Open source dynamic body physics engine by seanmcdirmid on Saturday April 20, 2013 @07:32PM (#5583239)
We can make semi-rigid bodies in verlet using strings are shape matching techniques, but the pressure needed to maintain shape necessarily interferes with stacking or any other kind of stable contact. Actually, their was a solution to this in a shape matching paper by Matthias [1] but I was never able to get it to work right.

I've played around a lot with Verlet, it is very powerful in certain cases...especially since you can just update the position of a mass directly (very easy to program, very mouse/touch input friendly). However, a rigid body physics engine is probably better for most game use cases.

[1] http://www.matthiasmueller.info/realtimephysics/

Re:Verlet-js - Open source dynamic body physics engine by jjoonathan on Sunday April 21, 2013 @08:54AM (#5584693)
Cool, thanks for the link!
Re:Verlet-js - Open source dynamic body physics engine by solox3 on Saturday April 20, 2013 @12:24PM (#5581848)
Alright, then why not do the very minor step up to Velocity-Verlet?
Re:Verlet-js - Open source dynamic body physics engine by seanmcdirmid on Saturday April 20, 2013 @08:53PM (#5583417)
I don't really think it really helps with stacking.
Re:Verlet-js - Open source dynamic body physics engine by daredevildave on Saturday April 20, 2013 @10:06AM (#5581427)
Here are some examples of ammo.js running in PlayCanvas[1]

Vehicle: http://apps.playcanvas.com/will/ammo/vehicle

FPS Character Controller: http://apps.playcanvas.com/playcanvas/physics/charactercontr...

Crates!: http://apps.playcanvas.com/will/ammo/crates

[1] Disclaimer: I'm a co-founder :-)

Re:Verlet-js - Open source dynamic body physics engine by rorrr2 on Saturday April 20, 2013 @06:35AM (#5580982)