What physics engine do you use?

Member
Posts: 249
Joined: 2008.10
Post: #1
Hi dudes!

What physics engine are you using with the iPhone?
I only know Box2D and Chipmunk.
What do you think are the easiest to use and port?
Is there any of them with native iPhone Support?
ObjC or C++?

Thanks a lot for suggestions.
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #2
bulletphysics works on iPhone, although I don't think that'd work well for 2D. Pretty sure bullet is all C++.

Personally, I've started writing my own physics engine -- not easy!
Quote this message in a reply
Moderator
Posts: 682
Joined: 2002.11
Post: #3
I know Chipmunk works on the iPhone. Skorche will know the specifics. As far as I know, it's a pure C library, so no changes would theoretically need to be made.

My web site - Games, music, Python stuff
Quote this message in a reply
Apprentice
Posts: 6
Joined: 2008.03
Post: #4
I am currently using chipmunk with Cocos2d-iphone. It seems to work well so far. It's pure C so it should be portable.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #5
Chipmunk runs fine on the iPhone. I haven't benchmarked it against Box2D, but I would expect it to be very competitive. You can (and should on the iPhone) redefine the floating point type used by Chipmunk to be floats instead of doubles.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Member
Posts: 249
Joined: 2008.10
Post: #6
Skorche Wrote:Chipmunk runs fine on the iPhone. I haven't benchmarked it against Box2D, but I would expect it to be very competitive. You can (and should on the iPhone) redefine the floating point type used by Chipmunk to be floats instead of doubles.

Thanks for replies.

I forgot to say I'm interested in 2D.

BTW, I'm a beginner in this topic, just a couple of questions:
Firstly I will try Chipmunk. My game uses C++. Must I create a C++ wrapper or something like that?
Can I create a set of bodies that interacts with my scenario but not between them? (I mean, the bodies overlap each other)

Thanks a lot
Quote this message in a reply
Moderator
Posts: 682
Joined: 2002.11
Post: #7
riruilo Wrote:Thanks for replies.

I forgot to say I'm interested in 2D.

BTW, I'm a beginner in this topic, just a couple of questions:
Firstly I will try Chipmunk. My game uses C++. Must I create a C++ wrapper or something like that?
Can I create a set of bodies that interacts with my scenario but not between them? (I mean, the bodies overlap each other)

Thanks a lot

C++: You are aware that C++ is a superset of C, right? Right? No weirdo wrappers required unless you want to.

Second question: yes, read the docs.

My web site - Games, music, Python stuff
Quote this message in a reply
Member
Posts: 249
Joined: 2008.10
Post: #8
Skorche Wrote:Chipmunk runs fine on the iPhone. I haven't benchmarked it against Box2D, but I would expect it to be very competitive. You can (and should on the iPhone) redefine the floating point type used by Chipmunk to be floats instead of doubles.

By the way, which one is easier to use and easier to port to the iPhone, Box2d or Chipmunk? And which one do you believe is better to create a platform game?

Thanks a lot for your time.
Quote this message in a reply
Member
Posts: 93
Joined: 2008.11
Post: #9
Hi,

It depends on your needs. If you need rigid body physics you are good to go with Chipmunk or Box2D.. both are great from what I have seen.
If you look for soft body physics I assume there are some engines which can be ported.. maybe FastLSM although it looks way too advanced plus 3D.
I'm writing my own because I'm just curious about how things work.

Alex

TapMania - iPhone StepMania // Human knowledge belongs to the world!
Quote this message in a reply
Member
Posts: 249
Joined: 2008.10
Post: #10
godexsoft Wrote:Hi,

It depends on your needs. If you need rigid body physics you are good to go with Chipmunk or Box2D.. both are great from what I have seen.
If you look for soft body physics I assume there are some engines which can be ported.. maybe FastLSM although it looks way too advanced plus 3D.
I'm writing my own because I'm just curious about how things work.

Alex

Thanks for reply.

I only need rigid bodies, no more. But I don't have any experience using physics engines (I'm not a C++/OpenGL beginner as I can create very small engines).
I'd like to create a small platform game, so I'd like the easiest one.

Thanks for suggestions.

Thanks
Quote this message in a reply
Moderator
Posts: 682
Joined: 2002.11
Post: #11
I haven't tried Box2D, so I don't know if it's easier, but I learned Chipmunk for uDG and it seemed very simple and easy to get running.

My web site - Games, music, Python stuff
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Collision detection using the Bullet physics engine MikeD 0 2,998 Aug 30, 2010 11:14 AM
Last Post: MikeD