A couple of weeks ago, we announced (standalone) Game Center support in Corona, and then showed you the basics of how to integrate it into your apps.
Since then, we’ve added support for more Game Center features to the gameNetwork.request() API, so today I’ll give you an overview of what those are. Before you continue, don’t forget to grab the latest Daily Build to ensure your implementation is up-to-date. At the moment, standalone Game Center support is available to subscribers only.
NOTE: This blog will go over some of the APIs that haven’t previously been discussed (outside of the API documentation)—this is not a Game Center integration tutorial. For a walk-through on how to get Game Center working in your Corona app, please see the previously published Game Center integration tutorial.
Each week on this blog, we highlight a Corona app that stands out. Almost always, the best apps are the ones that have great functionality/playability and are also great to look at.
Like it or not, an app’s ability to succeed and get people talking often relies on its looks. Unfortunately, not everyone is an awesome graphic artist, and a lot of indie developers out there can’t quite afford to hire one.
And that’s a problem!
But now, we have teamed up with Tapptics to bring you some excellent design lessons and graphics templates for your Corona apps. With Tapptics, you can now get a ‘Design Kit for Corona’ full of the following goodies to equip your app with aesthetic awesomeness:
A 15-lesson game and graphic design training via video.
Six app icon templates in .PSD and .PXM formats.
Design templates for iPad (portrait and landscape) in .PSD and .PXM formats.
Design templates for iPhone (1st Gen and Retina resolutions) in .PSD and .PXM formats.
Screen specifications for iPad, iPhone, and iPhone 4.
This package is, for now, available exclusively for Corona developers. Normally, a package like this would run you $149. But for us, Tapptics owner Jen Gordon is making it available for only $39 for a week (until the end of day on February 3), and $59 after that through our Corona LaunchPad. Not too shabby of a deal to make your app the belle of the ball!
For access to this package, e-mail us at launchpad@anscamobile.com and we’ll give you all the details.
We’re bringing you this deal as yet anothermeans to make the best Corona apps possible. And we can’t wait to see how great your apps will look after you graduate from the College of Tapptics!
Last year, Fire Maple Games released The Secret of Grisly Manor, which went on to become one of the mostsuccessful Corona games to date. Its beautiful graphics and immersive gameplay had people glued to their Android and iDevices.
Now (after nearly a year in the making) Fire Maple are ready to release their next puzzle/adventure epic, The Lost City, which FireChief Joe Kauffman told me is waaay more awesome and longer than Grisly Manor.
The Lost City is currently under review in the App Store — and I’m pretty sure you’ll see it up here sometime in the near future.
Rares and Anamaria head up the Romanian-based New Mindflowstudio. Much like your friendly neighborhood Carlos, they started out in the film-making world before heading over to app-making.
Below, they elaborate on their story of being film makers-turn-coders using Corona and our sidekick Kwik to make one of the best eBooks we’ve ever seen — Where’s Paradise?.
Rares Kovesdi + Anamaria Chioveanu, New Mindflow
After graduating from film school in 2008, we discovered mobile apps as a potentially great medium to distribute our work — especially to explore new possibilities for storytelling and new audiences. The two of us also met that year and it was clear to us from the beginning that we wanted to work together and be as independent as possible while doing so.
I had seen Steve Jobs’ keynote in which he introduced the iPhone SDK and App Store earlier that year, and I recognized it as a good opportunity to create and distribute our work outside the conventions of the established system. An opportunity that, most importantly, lets us be independent and focus on the creative part rather than the bureaucracy of getting a project funded — something which young film-makers often face.
After securing some funding from a friend, we started New Mindflow in 2009 with the idea of exploring games as a new medium to tell our stories and engage our audience in a way that isn’t yet possible with films. We had a couple of great projects and we were set on hiring graphic artists and developers to get them done. But after almost two-and-half years in which we had numerous setbacks and our high standards conflicted with our limited budget and the high costs of producing a great game, we re-founded the company in October 2011 to give commercial life to some of our artistic projects.
For now, New Mindflow is just the two of us, Rares Kovesdi and Anamaria Chioveanu. All of the content in our first app, Where’s Paradise? (film, photos, and text) is made by us, and we also designed the UI and did all the coding for development. By using Corona and Kwik, that last part was by far the shortest. Preparing the content and app design took almost a year, building the app with Corona and Kwik took less than two weeks!
Given our artistic background, we have no experience or training as coders. However, with Corona and Kwik we not only managed to produce an app that we are happy with and proud of, but more importantly the app is very stable and responsive — something that isn’t the case with a lot of interactive eBooks we’ve seen in the App Store.
Even though the app has yet to see any real success, the experience of making it was a great one for us. We got to make a film and put a “digital photo exhibition” together; I (Rares) got to realize my techie side and Anamaria got to rekindle her passion for drawing while making the map and app icon. But, most importantly, we have proven to ourselves that we can still continue to make the apps we want, even without outside funding.
For now, New Mindflow will be focusing on bringing to market some of our artistic projects, including an illustrated interactive storybook in the near-future. Nevertheless, we still have some game projects in development about which you can find out more by going to the Projects section of our website.
Getting back to the app, the Where’s Paradise? series puts side-by-side the western idea of paradise (small tropical islands with white sandy beaches and coconut groves) with the actual lives of the people that live in these often remote places. The first episode focuses on the island of Nusa Lembongan, 20km southeast of Bali.
We like to think of the app as a new kind of book; a new medium for presenting a film and exhibiting photos. A new way of seeing an artistic vision come to life!
To find out more about Where’s Paradise? (the apps and the overall long-term project) head over to our website.
You wouldn’t mind if we put up two tutorials for Tutorial Tuesday, would ya?
Below is a presentation given by coding extraordinaire Seb Lee-Delisle at the Update 2011 conference in the UK late last year. We were humbled when we saw that Seb chose CoronaSDK as his weapon of choice for his demo.
Be sure to let Seb know what you think on Twitter at @seb_ly.
Thanks for the awesome demo, Seb!
As mentioned previously, there are two brand new APIs available for creating native webView objects, as well as native video objects. And for this week’s “Tutorial Tuesday”, I’m going to show you exactly how to use them.
For quite some time now, Corona SDK has been capable of displaying web pages (see Web Popups), as well as video playback, so on the surface, it may seem like these “new” APIs are redundant. Fortunately, that is not the case because these new APIs provide solutions to some of the (often deal-breaking) limitations of web popups and video playback features of old.
Web Views vs. Web Popups
These two are very similar, but there are some differences in usage as well as functionality. The most notable differences include:
The ability to have more than one WebView at a time.
You can move and rotate WebViews as you would other display objects (although they are still native objects that cannot be inserted into groups).
You may attach physics bodies to them! (This could result in some pretty neat effects)
WebViews must be removed explicitly (e.g. they cannot be closed by returning false in the callback listener, as with Web Popups).
Video Objects
Native video objects are much more flexible than its predecessor (media.playVideo). The primary differences include:
The ability to specify a size for your video object (e.g. they do not have to take up the entire screen anymore).
There can be multiple video objects on the screen at once.
You may programmatically seek to specified location (in seconds) of the video file.
Video can be programmatically played/paused.
You can move and rotate video objects as you would other display objects (although they are still native objects that cannot be inserted into groups).
And of course, you can also attach physics bodies to them!
native.newWebView() Usage
If you’ve ever used Web Popups before, using native WebViews should be fairly familiar. If not, that’s okay too, because it’s very simple.
You can see the API documentation for details on all the function arguments, but they are fairly straight-forward. Below is an example of how to create a WebView that is 320 pixels wide, and 250 pixels tall:
The request() method an also take an optional baseDir second argument which can be used if the you specify a local file (such as an HTML file) as the URL string (first argument).
Easy so far right? Now, let’s create one with a listener that shows an alert whenever there’s an error loading a page:
local function webListener( event )
local url = event.url -- reference to url being requested
if event.errorCode then -- is nil when there is no error
native.showAlert( "Error!", event.errorMessage, { "OK" } )
end
end
As you can see, the event table in the WebView’s listener function includes event.url, event.errorCode, and event.errorMessage. As a reminder, returning false in the callback listener has no effect on the webView.
Next, let’s create a webView, move it around, and then rotate it (just for fun), and then remove it:
-- let's close the webView
webView:removeSelf()
webView = nil
Once again, please see the official native.newWebView() API documentation for more information on native WebViews, and also see the SampleCode for an example of multiple WebViews with physics! (Located at: /SampleCode/Interface/WebViewPhysics in Corona build 2012.731 or later).
Editor’s Note: There is a known bug that prevents local content from being loaded into WebViews, and will be fixed in a future daily build.
native.newVideo() Usage
So you thought WebViews were easy? Well you’ll be happy to know that native video objects are even easier to work with because there are no listeners to work with. You simply create the video object, optionally seek and/or move/rotate it (or add physics!), and then remove it when you’re finished.
Here’s what the syntax for native.newVideo() looks like:
native.newVideo( left, top, width, height )
Once again, the function arguments are pretty straight forward, but you can always view the API documentation for descriptions of each one.
Below is a complete example of creating a video object, loading a video file into it (which should be in your project folder), seeking to a specific playback position (in seconds), moving/rotating it, pausing, and then finally removal:
local video = native.newVideo( 0, 0, 220, 275 )
-- load a video and jump to 0:30
video:load( "myvideo.m4v", system.DocumentsDirectory )
video:seek( 30 )
-- play video and move/rotate
video:play()
video.x = 50
video.y = 150
video.rotation = 90
-- pause the video and remove
video:pause()
video:removeSelf()
video = nil
Very simple, yet very powerful API (as usual with Corona).
To see an example of multiple video objects (with physics), see the sample code located at: /SampleCode/Interface/VideoViewPhysics in Corona build 2012.731 or later.
And that concludes this week’s “Tutorial Tuesday”. As a reminder, these two brand-new, powerful APIs are available to subscribers only for the time being through our Daily Builds program (available to ALL subscribers). Subscribe now to start adding WebViews and Video objects to your Corona apps today!