Box2D AIR Native Extension

Discuss issues specific to miscellaneous ports of Box2D
Furinax
Posts: 10
Joined: Tue Feb 14, 2012 1:44 am

Box2D AIR Native Extension

Postby Furinax » Tue May 08, 2012 2:02 am

I'm in the process of writing an AIR Native Extension port of box2D. I'll probably be done by the end of the week so I'm curious about a couple of things.

1) Is there a real interest for this?
2) Can we get a new section for this in the "ports" index?
3) Are there any C/C++ developers who are also flash developers that would be interested in helping me find and fix bugs? I'm looking at over 20,000 lines of code already for this and probably somewhere around 25K when it's done. If you're wondering why so much... it's because I've basically written a C wrapper for every single class/struct and their properties and methods. This was necessary for 2 reasons. In the end the AS3 side will barely store any data. All properties and methods (spare the odd one) are pure interfaces for the equivalent native property/method in box2DC++. The second is that by doing things this way, the ANE's interface with Box2D is completely abstracted away, which means that when new versions of Box2D come out, the old version can be seamlessly replaced without any refactoring (except of course to add new classes and methods in).

Anyway I'll post back when I'm done and have got my source code somewhere up on Github and/or Google code.

jayther
Posts: 266
Joined: Sun Oct 25, 2009 3:28 am
Contact:

Re: Box2D AIR Native Extension

Postby jayther » Tue May 08, 2012 3:39 am

I'm definitely interested in this development. However, by experience, I haven't seen or heard a lot of AIR developers around (here or in the internet in general). Sure, there are a lot of Flash developers, but not a lot of those have even heard of AIR. Essentially, AIR isn't popular or well-known, despite Adobe's push on AIR (and their improvements).

If the Box2D AIR native extension port finishes, there may be a chance at getting its own forum, especially if a few people start using it and show some really good examples with it (this is all assumption and wild guesses, based on the other ports' activity). But it may fall under Flash (AS3) because that is the usual language used with AIR.

Furinax
Posts: 10
Joined: Tue Feb 14, 2012 1:44 am

Re: Box2D AIR Native Extension

Postby Furinax » Tue May 08, 2012 3:36 pm

Thanks for the input I'll post links to the source as soon as it's ready. I now have to go through 101 classes and code the actual implementation of the native callbacks now so it's probably not gonna be till next week when it's online. I'll definitely follow up though.

jayther
Posts: 266
Joined: Sun Oct 25, 2009 3:28 am
Contact:

Re: Box2D AIR Native Extension

Postby jayther » Tue May 08, 2012 4:02 pm

Hehe, there's no rush. -]

Komb
Posts: 1
Joined: Tue May 15, 2012 8:16 am

Re: Box2D AIR Native Extension

Postby Komb » Tue May 15, 2012 8:33 am

Box2D ANE sounds extremely good. I really look forward to what you will be able to come up with.

@jayther
You are slightly exaggerating here saying that "flash developers have not even heard of AIR" :o In this case those "devs" probably don't know the difference between radius and diameter.

Anyhow, with Adobe steadily marching into mobile world, AIR usage will definitely grow so having extensions like this will just add to the fun. (I hope that ANEs are meant to be platform independent.. have not investigated that deep).

Thanks,
k.

Furinax
Posts: 10
Joined: Tue Feb 14, 2012 1:44 am

Re: Box2D AIR Native Extension

Postby Furinax » Tue May 15, 2012 9:27 am

Komb wrote:Box2D ANE sounds extremely good. I really look forward to what you will be able to come up with.
(I hope that ANEs are meant to be platform independent.. have not investigated that deep).


The actionscript side is meant to be written in such a way that it does not change depending on your platform, but the native implementation is definitely compiled down to a platform-specific target. For example in this ANE I have to compile a .dll on windows, a .so for Android etc etc, write which library is to be used on which platform in a descriptor and then it all gets compiled neatly into a .ane file, which you can rename to SWC as well.

I had to put this on pause just for a few days because I'm doing a quick contract on the side. I had hoped to have it released by this past weekend but like I said, minor delay. Next target for release is this coming weekend so I'll follow up on that for sure.

jonathanhart
Posts: 1
Joined: Thu May 31, 2012 12:06 pm
Location: San Francisco
Contact:

Re: Box2D AIR Native Extension

Postby jonathanhart » Thu May 31, 2012 8:29 pm

I would love to see this come to fruition.

Furinax
Posts: 10
Joined: Tue Feb 14, 2012 1:44 am

Re: Box2D AIR Native Extension

Postby Furinax » Thu Jun 07, 2012 5:58 pm

Sorry guys, haven't had much time to work on this. Good news is though that I am back at it and I've started pushing to github. Don't get too excited, there really isn't anything that can be tested yet as I am filling in the implementation details. Like I said in previous posts, several thousand lines of code were generated and now it's just a matter of filling in the implementations for 101 classes. Some of them might not even be required, I'm going on a file-by-file basis here.

Anyway I don't really have a projected completion date for you but I'm hoping at the very least that in the next day or two I can have some tests pushed up to github that y'all can download and try out on your phones and/or desktop.

https://github.com/DigitalArchitectCanada/Box2DANE

Namekuji
Posts: 86
Joined: Wed Jan 07, 2009 10:31 pm

Re: Box2D AIR Native Extension

Postby Namekuji » Fri Jun 15, 2012 1:04 am

:mrgreen: AMAZING :mrgreen:
Good luck Furinax !

Furinax
Posts: 10
Joined: Tue Feb 14, 2012 1:44 am

Re: Box2D AIR Native Extension

Postby Furinax » Thu Sep 27, 2012 9:26 pm

So I figure I should post an update here since I posted about this in the first place. Turns out my SSD crashed and burned, and I lost many, many hours of changes to Box2DANE that were committed locally but not yet pushed to Github. Since then the project has basically died. I apologize to those who were hyped up about it. I won't promise anything this time around but basically this has taken a back seat to a superior project I'm actively developing anyway, which is a full port of the flash platform functionality to C++ along with a compiler front end to convert existing actionscript 3 to be compiled to C++ based on this platform, then to a native binary. But that's a whole other story and not related to box2D at all. Again I apologize for not following through on the box2d ANE, just lost wayyyyyy too much.


Return to “Miscellaneous”



Who is online

Users browsing this forum: No registered users and 1 guest