Physics Engine Support?

5 replies [Last post]
Dotnaught's picture
Dotnaught
User offline. Last seen 23 hours 40 min ago. Offline
Joined: 7 Jul 2009

It would be useful to have access to a physics engine, such as Box2d or Chipmunk.

http://www.box2d.org/
http://code.google.com/p/chipmunk-physics/

Replies

freshworks
User offline. Last seen 6 weeks 6 days ago. Offline
Joined: 25 Aug 2009

Yes any comment on this please, won't be so hard to wrap box2d in it is it ?

evank
User offline. Last seen 1 year 4 weeks ago. Offline
Joined: 16 Sep 2009

I actually submitted this one on a wish list before joining the company :) The nice thing about both Chipmunk and Box2d is that they both have reasonable licensing terms: MIT and zlib licensing (http://en.wikipedia.org/wiki/Zlib_License) rather than GPL. Of the two, I'd say that box2d looks like a better target.

The idea would be to do more than just "wrap" it, though. The fundamental goal of Corona is that it has to be a lot easier to use than the stuff underneath it -- otherwise, you may as well just use "the stuff underneath it" directly.

mb
User offline. Last seen 1 year 52 weeks ago. Offline
Joined: 6 Feb 2010

Just bumping this post/feature request for a physics library. It would be great to have a wrapped engine like box2d (rather than searching/building native lua ports, which don't really exist or would run slowly), possibly with the other Corona 'make-it-easier' functions you mentioned, Evan.

In addition, it would be great to have a 2d/vector maths or matrix library to assist with basic maths for games and other interactions. I don't know enough about binding Lua to external libraries to know the tradeoffs of building wrappers for external library code vs. building a native Lua library for things like this - it might be that it's easier or just as fast to build a native Lua library to handle maths like this. It might also depend on whether you'd consider wrapping 3d vectors and 4x4 matrices as well.

These features, along with other things like better sound function support (vol/pan/loop), bitmap/pixel controls, etc, obviously start competing with other game libraries like Cocos2d. Does the roadmap for Corona generally include features that would make it easier to build high-performance 2d games and other simulations? Or, is this stuff really left in the domain of objective-c/c/c++ apps and sdk's like Cocos2d?

carlos m. icaza's picture
carlos m. icaza
User offline. Last seen 7 hours 18 min ago. Offline
Ansca Staff
Joined: 22 Jun 2009

Feature added in our feature bucket for 1.2

:-)

Carlos

ChrisG0x20
User offline. Last seen 48 weeks 5 days ago. Offline
Joined: 12 Mar 2010

I like these ideas a lot! There are several native C libraries I've been using in my existing iPhone applications. What are the chances of a feature to utilize native code libraries from Corona?

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.