I was recently given the opportunity to present at FITC Screens. For those who don’t know, I began my career as a Flash developer 12 years ago, back when Flash 4 and Actionscript were first released. I have long been inspired by industry pioneers like Joshua Davis (praystation.com, once-upon-a-forest.com) and Keith Peters (bit-101.com), who have both spoken at FITC. It is a great honor and privilege to have been a part of this event.
A lot has changed in the last 12 years. The tools that we use, the platforms we target, the devices we use to access content and the ways we communicate and support each other (anyone remember were-here.com?) have changed, but the goal of building rich, compelling user experiences still remains.
We started with an overview of some of the content we would cover.
Next we looked at a chart that illustrates how popular technologies are supported on different platforms.
If you are creating an application, you do not always want to use a technology that is cross-platform, because you want your application to feel as native as possible. If you are creating a game, however, this is not much of an issue, so there are many benefits to choosing a technology that will not require a rewrite to support more markets.
I demonstrated Miriel’s Enchanted Mystery, a game that my wife and I both enjoy, as an example of a cross-platform C++ application.
C++ offers flexibility so that Miriel runs on Windows, Mac, iOS and webOS, including several delivery services like Big Fish Games.
If you want to make your own C++ game, SDL is an excellent tool for abstracting the low-level mechanics of each platform. If you prefer something higher level, Marmalade is a commercial framework to help abstract for mobile platforms, and optimize for the best performance on each device.
Many of the performance benefits of C++ are available if you write applications using Haxe. This is the approach that works best for me, because C++ is too low-level for my everyday needs.
Flash provides an API for sounds, display objects, events, network requests, shared objects and other important features. NME is a framework that provides C++ classes for most of the Flash API, so you can publish applications to Windows, Mac, Linux, iOS, Android, webOS and Flash.
I have been using NME to create cross-platform games for two years.
The Corona session earlier in the day demonstrated 250 objects at 28 FPS on an iPhone 4. The session following was regarding Adobe AIR, where prominent developers were quoted, “never have 500 of anything” in order to get acceptable performance. Just before I left for the event, my friend Philippe announced on Twitter that using NME, he was able to get 1000 objects, with scale, alpha, rotation and smoothing, at 60 FPS on an iPhone 4 (and has since gotten 3000 bunnies on an iPad 2).
As we had time, I stepped through Box2D physics, sprite sheet, animation and game samples. I showed how easy it is to compile for multiple platforms, and how well code completion works in FlashDevelop. Haxe is supported by many other editors, but FlashDevelop is my favorite.
If you have any questions, please send them my way, I would love to help.
A big “thank you” goes to Mumuja, who created the squirrel you see in these slides. I had wanted to create an open-source game sample for the session, but continued to be distracted with ideas for improving NME. Thank you again, and I am glad I could still give him a prominent home in my presentation!