Say hello to the Starling Framework!Daniel Sperl on September 21, 2011
I’ve got some busy weeks behind me, working hard on Sparrow’s new sibling, the Starling Framework. I already hinted that a new project is in the works in the Cocos2D Podcast, and some forum members might have read some mysterious remarks on that topic, too. Well, I’m excited that I’m finally able to tell you what this is all about!
What is the Starling Framework?
Most of you should know that Sparrow was heavily inspired by the Flash API. The target of Sparrow has always been to let developers use an API that is very similar to Flash on iOS. So it might come at a surprise when I tell you what Starling is:
Starling is a port of Sparrow to Flash.
Yes, you’ve read correctly! I agree that it sounds weird to port a Flash-port back to Flash - but it makes a lot of sense when you take recent developments of the Flash Platform into account.
Flash Player 11, which was announced today, introduces a new low level 3D API called “Stage3D” (formerly “Molehill”). This allows Flash developers, finally!, to leverage the power of modern GPUs (conventional Flash is rendered almost exclusively by the CPU). Conventional (old) Flash applications won’t profit from this new feature, though: you have to use the new APIs (which are very low-level, just like OpenGL) to get the speed-up.
And this is where Starling enters the stage. It provides you with an API that is almost identical to the Flash (Sparrow) API, but uses Stage3D in the background. That means: if you develop a new game with Starling, you don’t have to learn a new API, and will still have a much better performance than conventional Flash; furthermore, porting an existing game to Starling will be extremely easy.
One of the great things about Flash is that you can push SWFs to a plethora of devices. On PCs and Macs, it will run in any browser - this is what Flash is known for. But it runs on mobile devices, just as well: that’s, of course, Android and Windows Phone 7, but also iOS (Apple released the restrictions that prevented Flash content a while ago). The recent versions of the Flash SDK allow you to export to those devices with minimal effort.
Until now, the problem with Flash on those devices has been the performance. It worked, but you reached the limits rather quickly, simply because CPU power is rather limited on mobile platforms. Stage3D with GPU support, however, fixes the performance problem; and Starling provides you with the means to leverage that power easily.
But what about Sparrow?
However, that does not mean that Sparrow, or any other native frameworks, will become obsolete anytime soon. Only a native framework allows you to access all APIs of a system (GameCenter, Photo chooser, iAds, etc.). And a native framework will always have the best performance. That’s just the way it is. Starling shines when you want to create platform independent games, web games running in the browser, or for prototyping (because AS3 code is just much easier to write). Sparrow can show its strength when creating high performance, optimally integrated iOS games.
Thus, I will of course continue to develop and support Sparrow. In fact, when you use Starling, you’re already peeking at Sparrow 2.0, because it will share the same architecture. From the outside, not much has changed, but internally I laid the groundwork for many new features like filters (drop shadow) and 3D content. Thus, Starling is closer related to Sparrow 2.0 than to the current version.
I cannot not end this blog article without mentioning my sincere gratitude for the support and trust I received from Adobe while developing this framework - especially from Thibault Imbert, Adobe’s product manager of the Stage3D initiative. In fact, porting Sparrow to Flash was his idea - of course, I had thought about it myself, but I didn’t think Adobe that would be interested. Well, thankfully, I was mistaken! The Starling development was funded by Adobe, and they are investing a lot of time and effort in spreading the word about it. I can’t thank you guys enough for this opportunity! :-)
Finally, here is a list with many links pointing to more information about Starling.
- Official Homepage - the preliminary homepage of Starling.
- Support Forum - Sparrow users can login with their username.
- API reference - Sparrow users should find it familiar!
- Tutorial book - A huge (100+ pages!) tutorial book from Thibault Imbert that will teach you everything you need to know.
- Introduction video - A screencast from Lee Brimelow, showing you how to get started quickly.
- The particle system you all know from Sparrow is available from the start!
- A Wiki and an extended homepage will be added later.
That’s it for now! Happy coding, my friends! :-)