Native code extensions - Breaking out of the Corona Sandbox

Corona is too closed. There are many things (understandably) missing from the API, and it’s taking a long time (understandably) for Ansca R&D to design, implement, test & document all these things.

My request is: allow users to add native code.
Just a couple of ideas on how this could be done:

  • The “iPhone Wax” project has already demonstrated how you could get automatic bindings from ObjC to Lua and back (https://github.com/probablycorey/wax).
  • Another option is to add an EDK like AirplaySDK is doing.
  • Yet another option is to have a special build mode where Corona compiles to a library instead of an executable, such that we could write our own main in ObjC and call the Corona lib at the appropriate time.

Obviously, this would be something that is more targeting the experienced developers among your customers, but I’m pretty sure there are plenty of those.

IMHO, this should be a very high priority item. Give power to your users, then go back to focus on making sleek & simple cross-platform API’s for the most popular requests (as you’ve been doing in the past).

See also: http://developer.anscamobile.com/forum/2010/05/01/image-manipulation#comment-24640

[import]uid: 6795 topic_id: 7045 reply_id: 307045[/import]

I couldn’t agree more. There is a great community behind Corona and when you give us the possibility to extend its functionality, you can expect massive number of such extensions provided. [import]uid: 13563 topic_id: 7045 reply_id: 24663[/import]

I think the iphone wax way would be the way to go.

Although if corona could be built as a library like you suggested that is also a very good idea.

Anyway, + 1 [import]uid: 6981 topic_id: 7045 reply_id: 24673[/import]

Ive post the very same idea here:

http://developer.anscamobile.com/forum/2011/02/10/original-code-android

I thinks its too close too…

Should be a way to use Corona and make improve the code when Ansca could not supply a solution for something. [import]uid: 9133 topic_id: 7045 reply_id: 24677[/import]

I think the only version that I feel would be something useful for Corona would be an EDK. A static library kind puts me in the position of wanting to just roll my own project, and dumping all of objective-c (and relevant frameworks) in via wax would create a really large binary. I shudder at what a blackhole doing that with JNI would be for the poor ansca folks would be.
An EDK would be really nice, and would at least help get stuff like game center in there. [import]uid: 4555 topic_id: 7045 reply_id: 24696[/import]

+/- 1

:stuck_out_tongue:

C [import]uid: 24 topic_id: 7045 reply_id: 24830[/import]

I’m experimenting with a chess software: as you probably know chess engines are usually c programs comunicating with a well known protocol via pipes: is it possible to write a chess gui in corona and embed a chess engine in the final build?
tia [import]uid: 10482 topic_id: 7045 reply_id: 26885[/import]

My boss and I have really liked the idea of Corona: Lua programming for iOS and Android. But without access to basic APIs like Game Center, there is no deal. Even if Ansca implement them some day, more features will come in iOS 5 and the wait will go on.

We will probably continue using Unity, which is more complicated, expensive, slow and not proper for 2D. That’s life…

Please, guys, consider some integration with Xcode! Even some kind of library compilation in your servers would be great! [import]uid: 44349 topic_id: 7045 reply_id: 27821[/import]

+1

I doubt that Corona will be able to keep up with all the native features, and a native interface would give users a chance to keep up.

Wax looks very nice.

-FrankS.
[import]uid: 8093 topic_id: 7045 reply_id: 30266[/import]


Every time I need something different than the basics, I hit a transparent wall.

1) Threads on these forums stay unanswered for a long time (and that’s a general question): Ansca should probably improve his support. This is true for subscribers forums too
2) No way to extend (Ansca is not saying neither yes or no, so I presume the answer is no)
3) The culling issue with Lime maps…
4) Lots of basic features still not there after months
[import]uid: 10482 topic_id: 7045 reply_id: 30275[/import]

Lua has native support for dynamic linking of external libs. This support is available for Windows, UNIX, LINUX, OSX ( so IOS is also there!), and others.

Please TURN IT ON!!!

Or at LEAST let those of us who know what we are doing build what we need for your inclusion in the SDK.

I have made numerous offers to produce code for you for FREE, if you will just include it in the SDK.

ALL OFFERS HAVE GONE UNANSWERED.

I’m starting to think the success of the SDK is putting all of you in Holiday mode. [import]uid: 26049 topic_id: 7045 reply_id: 33451[/import]

You mean

linking

c. [import]uid: 24 topic_id: 7045 reply_id: 33455[/import]

I do like that song!

But, maybe it;s time to get a little more serious.

You appear to be more my age than the typical NCH, I’m sure you understand why I’m getting a little bent, investors and all that junk. [import]uid: 26049 topic_id: 7045 reply_id: 33462[/import]

we are aware of the request for external libs. but that would take corona to a new different level and until we have a solid foundation that we can support it as well as all the other issues like the one you mentioned about allowing for your itunes music to be played while running a corona app… that (music support) in terms of support costs are lower than including lib linkage. without having to deep dive and i will stop here. i think you understand and you would prioritize it the same way.

c

[import]uid: 24 topic_id: 7045 reply_id: 33469[/import]

Thank you for engaging.

I don’t know your internal state, but I’m sure you are doing your very best with what you have to work with. I agree with most of your decisions and understand the factors and scale you are dealing with. However…

I think it would be in your best interest to provide some way for those of us who have the ability, to extend the SDK. Can you enable ‘require’ to do dynamic linking of c libs? Perhaps in the nightly builds so we can develop our required functionality.

We don’t need support from you on this, just a working interface as described in the Lua 5.1 spec and instructed in ‘Programming in Lua 5.1’. I don’t think anyone would mind if you flat said “If you use external C libs, you have no support at all from anscamobile”. I can accept that.

Just give us the functionality and your test lib source, super secret even, back doorish, I don’t care, Please!

Your right, it would take Corona SDK to a new level, it needs to go there soon! [import]uid: 26049 topic_id: 7045 reply_id: 33479[/import]

funny thing is that we go back and forth on matters like this, but like i said, i can go on and on about why this is there and that is not there…

and the issue is not just “not support from anscamobile” deeper crevices run at the Apple EULA level. what if there is a lib that allows for interpreted code at runtime? and who runs the risk of having apple shut down entirely? us? that’s who apple will shut down. then who is to blame? and because of that, our developers will be SOL.

see how complicated this issue can get really quick…

thanks for the feedback this will help in our roadmap.

c.
[import]uid: 24 topic_id: 7045 reply_id: 33481[/import]

Sorry Carlos, but I do not understand your argument about why Apple would shut down Ansca if one of “us” would take the liberty to misuse any access to linking-in native code.

Any objective-C developer has that option already to link-in any interpreter they want and when they do, Apple will pull their apps and not the IOS SDK company (which would be Apple :wink: ).

Second, other toolkits like Appcelerator, Moai, Wax do support linking-in native libraries and the app developers themselves are responsible for following Apple’s guidelines about no interpreted code at runtime. How do Appcelerator and Moai get away with it? Do they have better lawyers? :wink:

As I pointed out before, Ansca is a very small company and it could benefit enormously if you would work together with your users to enhance Corona. Many of us are now at your mercy to implement extended access to platform functionality… which is not a pleasant state to be in as your plate if more than full…

Currently, Corona has an edge over some of the other toolkits, but if Appcelerator provides a bridge to box2d, or if Moai matures enough, you may face some tough competition with your closed approach.

Please, let us help you.

-FrankS.

[import]uid: 8093 topic_id: 7045 reply_id: 33503[/import]

FrankS

Like I said, "thanks for the feedback this will help in our roadmap."

Which means, I will, as I have already broach the subject, bring it up again and see what we can do.
C.

[import]uid: 24 topic_id: 7045 reply_id: 33506[/import]

This thread makes me very sad. I’m currently evaluating frameworks for game development. I really want to use Corona, it seems like a great toolkit. But, while the limitation for native is a big concern (we need to do a custom physics package that has to be written in C), the dismissive tone of the founder here is an even bigger red flag. Why would I want to tie myself to someone who is clearly not interested in listening to his developer community, and basically said, grudgingly, only that he’d “consider it”? [import]uid: 71048 topic_id: 7045 reply_id: 41794[/import]

If you are interested in custom code, contact enterprise sales at Enterprise Sales
I made a note of this in our roadmap page.

c. [import]uid: 24 topic_id: 7045 reply_id: 41795[/import]