Opinion on use of physics

So, I’m working on a sidescroller game right now (well, more accurately, accumulating all of the tech for it), and I’ve gotten to using controls and moving the character around the world. So I was curious as to what everyone thought about using ODE or the default Panda physics. Here’s some info on the game.

All of the characters and environments are 3D, but the movement is restricted to 2D (like I said, it’s a sidescroller). I’m far from trying to run a physics simulation, but I obviously do need collision, and basic physics things like jumping, etc. My hesitation with using the default Panda physics comes from my previous use of things like BlitzBasic, where if an environment object moves, it passes right through the character, or does not move the character with it (ie. standing on a moving platform).

I also read somewhere that ODE does not like being restricted to 2D, and it may cause problems. Is this also the case with default Panda physics? I’ve also seen 2D physics engines like Box2D, but as it’s not integrated, it would probably be more difficult to use.

So basically, I would like to know any thoughts on how to go about this. ODE seems like it’s probably overkill for what I need, but the collision looks easier to me than what I’ve seen in the Roaming Ralph example.

Any ideas? Thanks for listening. :slight_smile:

For the record, last time I tried ODE worked fine when using it in the 2D plane – Panda provides OdePlane2dJoint to help with that.

My experience with using ODE for a sidescrolling game has been suboptimal. It just doesn’t control very well and you end up with bugs that are very strange. Unless you’re doing something with the physics I’d recommend you stay away from physics engines, it doesn’t simplify coding at all.

That being said, like pro-rsoft mentioned ODE does have a Plane2D joint for restricting object movement to the XY plane.

Thanks for the info. :slight_smile:

It seems like most things can be handled without a real physics engine, the only exception I can tell right now would be things like moving platforms taking the character with them.

As for collision, I’m just having trouble using meshes as collision objects. For instance, in the game, I don’t want to have to create collision planes for each part of the floor, and the CollisionPolygon and CollisionFloorMesh don’t seem to let you add an actual mesh to them. How do you handle level collision?

It requires adding a line to the .egg file - read up the BallInMaze sample and the RoamingRalph sample, they discuss how to do that.