The biggest problems in implementing physics to your game - Help me with my thesis

Started by
6 comments, last by gb_programmer 16 years, 4 months ago
Hi, I'm doing my masters thesis(or "Pro Gradu") in the Department of Information Processing Science in the University of Oulu, Finland and I need some empirical data... and it seems data gathered from forums is valid for this kind of research... SO YOU CAN HELP! (plz do :) .. Any answers will be processed anonymously (I'm not interested in you, just your answers, no offence intended ;) So, my first question is: What are the biggest pittfalls/problems you have run into when implementing physics into your game(s)? (let's say the 10 biggest problems per person, though even one is appreciated :) And the second question: What is your recommended solution to these problems? (if you have one) Thanks in beforehand to any who have time to answer my silly questions :)
Advertisement
Actually, these days, adding physics to your game is one of the easiest things to do. There are a ton of really great 3rd party physics libraries out there that do everything under the sun and are amazingly fast: Ageia PhysX, Havok, ODE, Ogre, microsoft is allegedly working on one, other common ones escape me at the moment.

A few of the really good ones are also free for hobby development. They already support highly threaded environments, have kickass visual debuggers, and are a snap to throw into any engine framework.

Basically, if you're starting from scratch it's very very easy to just pick a library and build your engine around it.

The only negative I can see is that using a physics engine/API requires that you understand at least basic newtonian physics pretty well. But that's like saying the downside of game development is that you have to know math =)

-me
Thanks for the answer, but it wasn't actually what I wanted.

Clarification: I don't actually need any help myself .. I need YOUR problems (and the potential solutions to them), so I can present them and the solutions in my thesis. Think of it as a problems avoidance handbook :)
I am not very expirienced with physics, but there are 3 common problems I have met:
1) objects stacking does not work
2) objects are jiterring while they should rest
3) numerical and physical unstability

Solution: There are so many different methods how to deal with each of them that it really can't fit into one post...
Are you more concerned with the integration of physics and gameplay, or the implementation of physics engines?

I have quite a bit of experience with the latter. Here are some of the difficult things i've come across in implementing my physics engine, and with the solution that i used to remedy the problem.

1. problems with resolving multiple collisions per rigid body -> sequential impulse constraint solver
2. stable stacking -> object deactivation
3. continuous collision detection -> ? still working on this one
4. efficient broadphase collision detection -> octree or possible spatial hash data structure
5. stable joints are hard to do well.

that's my list for now. I don't have much experience with the actual game<->physics integration and possible problems in that though.
Definitely one major one: Object jitter when at apparent rest. This can also lead to stacking problems.

Also, joints can be hard to setup sometimes...depends on how you have to go about it.
I haven't yet started implementing physics in my game, still in the research phase. But from what I know so far, the biggest pain is having to learn Calculus in order to figure out how to use Explicit Euler integration. Implicit Euler integration (acceleration += force * timedelta; velocity += acceleration * timedelta; position += velocty * timedelta) works really badly for games. A very high and completely stable frequency of updates is required to achieve good results, and even then there is a lot of error.
Quote:Original post by adoado
Definitely one major one: Object jitter when at apparent rest. This can also lead to stacking problems.

Also, joints can be hard to setup sometimes...depends on how you have to go about it.


Yep, this is my pet peeve. I've seen this problem on several physics engines.


This topic is closed to new replies.

Advertisement