Codea 2.1 Addons

I realise I might be jumping the gun a little here what with 2.1 only being a day old, but I was wondering if @Simeon (or anyone else) would be able to either describe or point me in the direction of the new Codea add-on documentation.

I’m assuming this is going to be the best way to implement Game Centre, iAd and IAP functionality.

I’m interested also, I haven’t yet exported anything from 2.1 to see what is included. It would be awesome if we could get those main 3 add-ons (Game Center, iAds, and IAP) working, so we don’t have to learn Objective-C as well as lua.

@TechDojo version 2.1 comes with a Game Center addon that you can uncomment to activate. There is also a Github repository for them here

Addons aren’t very different to before, but the context in which they are called has changed.

@Simeon where is it located in the code so I can uncomment it, and how do I use it? Thanks.

in you will find these lines:

Specifically, uncomment line 26.

    //Uncomment the following line if you'd like to use the basic GameCenter addon:
    //[self.viewController registerAddon:[GameCenterAddon sharedInstance]];
    //See GameCenterAddon.h for the Lua API description.

That’s perfect thanks @Simeon. Just one question though (if it’s not too stoopid) - how is it best to test this, can I only run it in the xCode sim after I’ve exported my code. Ideally I’d like to get that implemented and still be able to code on my iPad.

Also from what I’ve seen of the code, it would seem like Game Center, iAd’s and IAP are probably the three main addon’s that everyone will want - so why not include them in the build - especially as you’ve already done all the hard work for Game Center?

@TechDojo the plan is to have them as optional extras from the “Export” menu. I’m also considering including stubs in Codea so that projects in the app can make the calls (but they do nothing or just simulate Game Center / iAd). At the moment you can write functionless stubs yourself.

@Simeon - that would be excellent, definitely something to look forward to :slight_smile: