Is Box2d for me?

Hi all,

I have had a brief experience with bullet for a different project and couldn't get reliable results on the iphone.
What I am looking for (forgive me if I am approaching the problem the wrong way) is a 2d physics engine that I use within my 2d tile world.
My use of physics will be quite restrictive; for example currently collisions are handled on a tile basis and so are quick (I like 60fps 🙂 ).
Can I use box2d but still have 'control' over a physics object i.e. things that bullet had trouble with were moving a physics object manually for example.
I guess really I want 'some physics' but not a complete implementation of everything into the physics world.
A good example might be a platform game where the only 'physics' object is a rope - everything else is dealt with outside the physics worlds scope.
<Hope this makes sense> 🙂)))

Does Box2d allow for this type of use? (or am I simply mis-using it!!!)

Cheers

Mark
As far as I know, Box2D is intended to follow real Newtonian physics. Since teleportation isn't covered in these laws, exactly what will happen depends on how you set it up I suppose.

If you're looking for a physics engine that.. well, doesn't follow physics, you may be out of luck, but generally you can find workarounds to implement your against-laws-of-physics techniques.

Trying to meld together a non-Box2D world inside a Box2D world would be a bit difficult. I mean, think of it exactly like trying to get Bullet and Box2D working together so that the objects can move each other - it just won't happen.

-P
Hi,

This is what I thought 🙁
You are quite right in that apart from a 'physics' game (of which there are just soooooo many on the iphone); I need some physics but not all physics.
Teleportation is a big necessary in this mixed kind of environment.
I also noticed in box2d limitations that it doesn't deal perfectly with 'tiled' collisions; i.e. typically what you would need, and having awkard 'caught on corners' or 'juddering' always looks bad.

Cheers
The loop shape in 2.2.0 helps a bit with that, but it's still not perfect.

-P
markhula wrote:Hi,

This is what I thought 🙁
You are quite right in that apart from a 'physics' game (of which there are just soooooo many on the iphone); I need some physics but not all physics.
Teleportation is a big necessary in this mixed kind of environment.
I also noticed in box2d limitations that it doesn't deal perfectly with 'tiled' collisions; i.e. typically what you would need, and having awkard 'caught on corners' or 'juddering' always looks bad.

Cheers



Yes, The thought of being imperfect. 😠

Original thread: https://box2d.org/forum/viewtopic.php?t=6233