Last week, we seeded access to plugins to our beta testers. The overall feedback has been positive, which means plugins are just around the corner for daily builds!
This is going to be a major change in how you’ll be doing cross-platform development with Corona. We also plan to make some plugins available to Starter in the next public release — more on that in a moment.
So it’s high time I walked you through how plugins will work!
First, what sort of plugins? We’ve broken them up into several categories:
- Ad Providers
- Analytics Providers
- Bluetooth accessories (e.g. joysticks)
The initial test set we gave to beta testers included the following plugins: AdMob (iOS and Android), Inneractive (iOS), OpenUDID (iOS), and Green Throttle (Android).
We’ve also got several more coming from 3rd party partners. And we’re also working on several utility plugins ourselves, such as OpenSSL, Zip, and Ouya, just to name a few.
Plugins and Developer Experience
Second, we spent a lot of time — a lot — trying to ‘coronify’ how plugins would work in Corona SDK.
We’ve seen a lot of plugin architectures and seen how much can go wrong, so we wanted to make sure we did this with an eye towards the longer term. We thought through a lot of questions like:
- How do you find all the plugins that are available? Usually, you have to get lucky with a Google search.
- How do you ensure the right version of the plugin is being used?
- What if a plugin requires special build flags?
- What if the plugin is only available for device? What do we do when we want to run a project in the Corona Simulator?
- How do we install the plugins so that we can use them?
Plugins and SDK
In answering these questions, it turns out this was an area ripe for innovation.
Previously, I mentioned that the way you tell Corona that you are using plugins is through some minor modifications to
build.settings. What I didn’t really cover was all the machinery that’s happening so that you can use it just like any normal library. In other words, when you use plugins, you just ‘require’ them like any other library — and it just works!
This has to work at two levels. It has to work on the device. And it has to work in the Corona Simulator:
When you do a device build, our build server will auto-magically package your plugin so that it all works. There’s actually a lot of trickery happening so I’ll just highlight one on each platform. On iOS, some plugins require additional OS frameworks that Corona does not normally link against, while on Android, some plugins wrap an Android library that requires special changes to the AndroidManifest. Thanks to our new devices build servers, we’re able to take care of all of these intricate details, so you don’t have to deal with them!
What about the Corona Simulator? Well, when you open a project, we’ll download plugins as needed. That way, your project will run normally. There’s one caveat to keep in mind about plugins that run in the Corona Simulator. Just like certain libraries, like ‘facebook’, will only run on device, some plugins will offer features that will only function on the device. In those cases the plugin will simply be a stub, just like the ‘facebook’ library is when you try to access it on Mac and Win. The functions exist, but they do not do anything.
Further out: Plugin Marketplace
Several folks have asked whether we plan to create a marketplace where they could make or sell plugins to other community members. The answer is yes, except we see that as something further out.
In order to provide that, we need to have certain billing/store infrastructure in place. Now as a team we have to make choices, and right now that means we’re prioritizing engine features over writing annoying business logic. So that’s my long winded way of saying, yes we are working on it, but no, it’s not our top priority.
With that said, I wanted to bring it up because there will eventually be some plugins that are sold either by us or perhaps from one of you!
On top of that, we plan to make plugins available to Starter devs in the next public release. Some of these plugins we think should come free, but others we think are enough effort to build/maintain that they shouldn’t be free.
Finally, we think we have found a way to square the circle in terms of making IAP/store affordable to Starter devs, so I want to share that with you. When we get this marketplace up, one of the things I’d like to see is an IAP plugin that a Starter dev could buy — one for each app store. Honestly, we don’t know what is a fair price per plugin, but intuitively, I know it would be less than what the old Indie tier cost.
Okay, that’s it for now. I know many of you want to hear more about graphics soon, so that’s on my short list for things to talk about next!
Posted by Walter. Thanks for reading...