Native Extensions & Performance Examples

I’m well into development on an iPhone game but as the scale of my project grows the level of complexity does as well. I would like to separate my project into high level game UI/Actions/Layout and low level libraries (i have some in ObjC & C). Looking at Corona it looks like a great high-level abstraction, as i’ve used the Lua/Engine separation in games before. However, to really make this work i need to be able to write libraries in ObjC or C/C++ to extend your runtime to allow me to call out from my Corona app in Lua to these native libraries (collision, generation, etc). Looking over the docs i don’t see any details as to how i can extend the system. Is this supported? Could you provide a simple HellowNativeWorld that calls out to a ObjC or C/C++ library that i can use as a template?

In addition, it would be very helpful while i’m doing my evaluation of Corona if i knew how it preformed in more graphically intense games. All of the games i see published so far are very low on the graphics side of things. My game has a bit more detail, triangles, and textures (i’m using OGL*ES) than what i see in your gallery right now. I would love to see a demo of something like the fish example running with 2k-10k fish so i could get an idea of the performance with a large number of sprites. Right now i can run the sim on my machine with 2k fish but i have no idea how this would perform on the iPhone so i have no way of evaluating if Corona will meet my performance requirements. Even just a quick Video of the fish demo running on a an iPhone (3G & 3GS) with 2K+ fish would be a start. However ideally i would like to be able to run them myself, and tweak it to more reasonably approximate my usecase so i can do a more accurate evaluation.

Thanks,

[import]uid: 2925 topic_id: 143 reply_id: 300143[/import]

I’d love to see some native integration examples as well !

regards
m [import]uid: 1540 topic_id: 143 reply_id: 130[/import]

It has been over a week sense this post, with no response, and it looks like about two weeks sense any post from anyone at Ansca on these forums. I’m starting to wonder what happened. [import]uid: 2925 topic_id: 143 reply_id: 131[/import]

We are updating the contents and a new developer site with more information. We just posted a FlashLite to Ansca Corona event in the Forums.

We don’t support native integration in the Corona environment just yet. We are looking to see how we can deliver such functionality. We will submit questions here and get proper feedback to add this feature so that it makes sense for Corona and you our users.

We are working on device builds and that should allow you to test on the actual device. We did a wide mail distribution to our users a while back and lots of them signed up for the early drop of the device builds which should be out in a week or two.

Hope this helps and thanks for letting us know that we had been silent for a few days. This is the feedback we like to hear.

Carlos [import]uid: 24 topic_id: 143 reply_id: 132[/import]

Hi Carlos,

The “native integration” problem is one that Lua solves directly, is it not? That is, by the require() function that I pointed out in another thread. If dynamic loading of a shared library is doable, then native integration is not a problem. But of course the library referenced by a require() must actually be present in one of the folders where Lua is looking for it, within the App.* tree.

Am I right or am I missing something ?

Thanks,
Kyle
[import]uid: 2543 topic_id: 143 reply_id: 134[/import]

C/C++ support :“Looking over the docs i don’t see any details as to how i can extend the system. Is this supported? Could you provide a simple HellowNativeWorld that calls out to a ObjC or C/C++ library that i can use as a template?”

It has been almost a year now since this inquiry was posted.

Is there any hope to see support for at least C/C++ functions from Corona? [import]uid: 8520 topic_id: 143 reply_id: 5408[/import]

Currently C/C++ and Objective-C calls are not supported by Corona 2.0. We have received a number of requests for this feature and looking at what it would take to implement the feature in the future.

-Tom [import]uid: 7559 topic_id: 143 reply_id: 5418[/import]