🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Collision response system physics engine

Started by
1 comment, last by Programmer71 2 years, 12 months ago

Hi guys,

I am currently trying to implement a custom 2D physics engine, and I'm working with the book “Game Physics” by David Eberly. Unconstrained motion works fine, but when it comes to constraints, the book uses an LCP for colliding and resting contact. I know the mathematics behind an LCP and understand Lemke's method described in the book, but I read many articles and discussions and many people recommend using SI or PGS.

I know they say Lemke's algorithm is slow, but this is no problem for me since I plan to do a non-realtime physics engine for fun. So every timestep after all bodies are updated, the data is written into a file. When the physics-simulation has finished, the file can be opened in an OpenGL-program I already wrote and you can watch it like a movie (The file contains positions and rotations of all objects for every frame, so the scene can be reconstructed).

Basically the computer has all the time it needs for calculating a time step and handle all collisions.

Can I then use the LCP method with Lemke's algorithm for global and realistic results? Or should I still use an iterative solver instead?

Thank you very much!

Advertisement

There is a lot of literature about this problem, look into ‘penalty methods’ or if you do not need reltime, you could also try brute force method.

This topic is closed to new replies.

Advertisement