# Is ODE good enough for me?

This topic is 4977 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I'm trying to create a 2D top-down shooter with realistic physics. I've tried my own 2d impulse physics engine for about half a year now, and I'm pretty much there, but there are quite a few of small problems that I can't solve, or find mention about on any paper. I need my bodies to be constrained to only 2 dimensions. I want it to be fast too, so I don't want ODE to be doing extra work for 3D and then applying a 2D constraint. The only extra feature I need, is to specify different directions for friction. ie. For a car, I want the sideways friction to be greater than the forward and backward friction. Can ODE do all that I need? If so, I'm really looking forward to using it. After half a year of slaving away with equations, I finally decided "screw it", my goal is to write a game, not a physics engine. Thanks for your input. -Cuppo

##### Share on other sites
The ODE mailing list, about a year ago, had quite a bit of discussion about 2D. ODE as it stands is not really suitable for it, because trapping all your objects between two gigantic planes makes them jiggle and try to get out. Someone was working on a 2D version, but I don't know how far they got. The upshot of this is that you would find it easier to write your own 2D physics engine than to work around all the issues that would arise from trying to use a 3D one, and it would be significantly faster, because 3D rotation matrices are a LOT slower than a single angle in 2D...

You may find that if you go to www.sourceforge.net and search for "2D physics" or "sprite physics" it comes up with some things you can either use, or help to complete and then use. Even on google, you may find that using "sprite" instead of "2D" comes up with some new finds for you.

Better, however, since you have already written something, is to ask for help - the open source world needs a decent 2D physics engine. Can you separate it from the rest of your project easily? I'd have a go at friction for you :o)

##### Share on other sites
http://www.gamedev.net/community/forums/topic.asp?topic_id=251638

##### Share on other sites
Just saw this on a flipcode post:

http://flatland.sourceforge.net/

2D wrapper around ODE (with custom collision detection). The behaviour in the demo seems pretty nice (i.e. stable, no jiggling) though maybe it's not as speedy as it could be because it's got the 3D overheads.

One nice thing is that the flatland code looks incredibly clean :)

##### Share on other sites
hey their demo is REALLY nice, i didnt realise a lcp could run so quickly with so many items,

##### Share on other sites
Quote:
 Original post by SquirmThe ODE mailing list, about a year ago, had quite a bit of discussion about 2D. ODE as it stands is not really suitable for it, because trapping all your objects between two gigantic planes makes them jiggle and try to get out.

I remember one short discussion on this, but don't remember the general conclusion. I do remember that I contributed a comment to someone that the right way to do 2D with ODE (and any general 3D physics engine really) was to use custom rigid body constraints to keep an object upright and at a constant Z. Using this approach, there ought not to be jiggling. Hmmm. One of these days maybe I'll find 2 minutes to play around and build some demos of this stuff to post as examples.... The two gigantic planes idea is definitely the wrong way.

1. 1
Rutin
34
2. 2
3. 3
4. 4
5. 5

• 12
• 14
• 9
• 9
• 9
• ### Forum Statistics

• Total Topics
633337
• Total Posts
3011415
• ### Who's Online (See full list)

There are no registered users currently online

×