2D physics engine (Verlet)

Advanced game related topics
User avatar
idle
Always Here
Always Here
Posts: 5839
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: 2D physics engine (Verlet)

Post by idle »

Generally speaking you don't, the fixed frame rate ensures that the physics updates remain constant
(assuming that the renders can handle the target speed)
Though you can turn off the frame rate sync if you wish but then it'll mean you get variable speeds which isn't really of much use
since it doesn't use time deltas in the update, the physics updates are a function of the Frame rate.

You might want to look at the Chipmunk wrappers which is more stable.

The Verlet engine has a couple of issues to be aware of
it doesn't always stabilize
- items stacked on top of each others can cause jitters
If too much force is applied to an object it might invert
-turns inside out which will then cause the object to go out of control)

As how to turn off the FPS sync it's a parameter in create engine function if I remember correctly
Windows 11, Manjaro, Raspberry Pi OS
Image
Post Reply