Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Reference for future Codea's API

beebee
edited June 2012 in Suggestions Posts: 381

Like it or not, Codea will be getting more and more complex by the time. By the release of Codea's runtime, more people will use Codea for serious app development tool. I also plan to do it as well. :)

For visual APIs, Codea needs to look more at Processing's API since it's the main reference since the beginning, and -please- complete the missing ones.

Here's the list of Processing's API: http://processing.org/reference/

For non visual APIs, I suggest Codea to look at Ansca Corona's API since it's the most popular Lua based development tool today. There are many useful APIs can be found there that can be provided by Codea as well (e.g. networking, multimedia, file, etc).

Here's the list of Corona's API: http://developer.anscamobile.com/reference

I plan to create some interactive ebooks app using Codea and submit it to AppStore. I don't see any major potential obstacles with the display especially since the newest update brought image import. But I think I'll get some troubles with the audio since Codea doesn't support either mp3 file or audio import. I also read somewhere that paper fold/scroll effect is provided natively by the iOS SDK. Could Codea provide API for that feature too? Any response about this feature from TLL?

Thank you.

Tagged:

Comments

  • SimeonSimeon Admin Mod
    Posts: 4,958

    @frosty added his own audio playback support through the runtime. For now, please do it this way. We want to add this too, but it will require a lot of UI design and implementation time on our part — so we probably won't be able to add it as soon as you need it. However, as I discussed with @JockM in another thread, we'd really like to add generic file IO support with a great built-in UI. This would then give the necessary UI for importing music.

    The fold/scroll effect is a Core Image filter that is applied to views. I believe iOS 5 exposes a page style view controller that allows iBooks style page flipping. That effect can't easily be ported to Codea because Codea is built on OpenGL (not Core Animation). The effect could be re-created using textured meshes, but the algorithm is quite complex (it involves modelling a grid curling over a conic shape based on a touch direction and position).

    Good point about the APIs, we're always looking to expand them and I'll look over them again.

  • beebee
    Posts: 381

    Thank you for the fast response, @simeon. I really appreciate it. Well, the fold/scroll effect is a nice to have feature. I can live without it. But the audio import and playback is a must have. Is there a quick tutorial somewhere about how to do this using Codea's runtime?

    Actually I'm still on the planning stage at the moment. I'm not going to do it anytime soon either. Will do it in the next 2-3 months perhaps, when I suppose I will have more free time. Nothing serious, I just want to test the water. :) In fact, I'm still considering whether I would make it as an app or an ibook. I prefer it to be an app though because it would be more interactive (an in-book games?). Well, let's see. :)

  • SimeonSimeon Admin Mod
    Posts: 4,958

    A more generic file IO system will open the possibility for music playback. And it's something we would like to put in.

    There's some threads on the forums about exposing functions in the runtime but I can't recall exactly which ones. Hopefully someone can point them out.

    iBooks Author seems to have a lot of power — though it has a pretty specific content delivery style. It does let you include Javascript widgets.

  • Posts: 159

    Sorry, I just realised I never got round to posting my audio code. I'll try and do it when I get home :)

  • Posts: 266

    @frosty did you post your audio code. I wanna see how you would use audio in xcode

  • Posts: 666

    +1

  • There's a great discussion of the conic approach to page folding/flipping in the Microsoft Windows 8 "Austin" demo app blog http://blogs.msdn.com/b/vcblog/archive/2012/09/27/10348494.aspx

    Austin is a pencil drawing program using meshes to model the page and pencil track. The videos are awesome.

Sign In or Register to comment.