Say hello to the Starling Framework!

Hi folks,

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.

Stage3D

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.

System requirements

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.

About Adobe

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! :-)

Links

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! :-)

17 Comments

Sparrow-Framework.org hacked [solved]

Hi folks,

some of you might have had an unpleasant surprise on their last visit of the Sparrow-Framework pages. They were welcomed not with a cute, innocent, little bird — but with this serious looking security guy:

The security warning some users saw around 2011-08-25

You can imagine how thrilled I was at his appearance!

Well, the fact is: he was right. Some bad, unfriendly criminal (reportedly he was unshaved and rather fat — not a pretty view!) used a vulnerability in one of our scripts to insert some bad code into our web page.

Being a very cautious person, I’m always keeping the server software up-to-date, and the bad script was already fixed a few days ago. However, it seems that I was a little too late — the intruder had already exploited the vulnerability. However, we found the change he made and removed that code. It will take a while, though, until our domain is removed from Google’s blacklist.

Now, the important part: was this dangerous for our visitors? Fear not, I haven’t heard from any actual harm being done. Most malware does not work on up-to-date browsers and operating systems anyway (and are targeting Windows, while most of you will be running OS X).

So, all I can do now is apologize for the inconveniences this might have caused. We’ll do our best to avoid attacks like that in the future — but as we just learned, there’s no guarantee for anything; not even for our small chicken. Ehm. Sparrow. ;-)

EDIT (2011-08-26): Heureka, Google removed us from the blacklist! The warning page has gone.

7 Comments

Sparrow on the Cocos2D Podcast!

Yes, you’ve read the title correctly! April 1st is long gone, so this is no joke! :-)

Cocos2D banner thankfully borrowed from cocos2d-iphone.org ;-)

(I considered adding a few pink and red hearts between the two logos — but perhaps this would have been a little too cheesy *g*.)

Mohammad Azam and Steffen Itterheim, the creators of the Cocos2D Podcast, have been kind enough to invite me into their podcast. In a session of about one hour, we talk about different things related to the Sparrow Framework — like how it came to life, what sets it apart from its competition, and about the next steps that are planned. Furthermore, I have a mysterious announcement to make (!), and I shamelessly advertise for Gamua’s next Sparrow application, Kabaam! I’d be honored if you checked it out under the following link:

Cocos2D Podcast: Daniel Sperl explains the Sparrow Framework

Thanks again, Azam and Steffen — it has been a pleasure chatting with you!

5 Comments

New tutorials: Textures, PVRTC, Auto-rotation

There are some topics that pop up regularly in the forum. Instead of answering them over and over again in the forum, I thought it would be a good idea to take the time to write extensive tutorials on those issues!

The place for those tutorials is, of course, the Sparrow Wiki! Here are the new tutorials you’ll find there:

  • Texture Formats: Best Practices — Everything you always wanted to know about textures, but were afraid to ask
  • PVR Textures — what they are, why you should use them, and of course: how to use them!
  • Auto-rotating a game — what you have to take care of when you want to rotate your game when the device orientation changes.


I hope this helps some of you in your development process! Leave a comment if you find something important is missing.

5 Comments

User’s corner: “Caribbean Treasures”

After Go Usagi!, I’m proud to present another post in the “user’s corner” series! Today, the Ukrainian developer Kostya Teterin writes about his experiences when developing the puzzle game “Caribbean Treasures” for the iPhone. Thanks for taking the time to write that article, Kostya!

Who are you?

My name is Kostya Teterin. I am founder and owner of Emotion Rays Entertainment, and a big fan of computer games. I would like to tell you the story behind “Caribbean Treasures” and Sparrow.

Caribbean Treasures

Caribbean Treasures is a puzzle game that is available on the AppStore in two versions, a complete and a lite edition (which is free but limited to 20 levels, while the complete version contains 101 levels). It is a remake of my old PC game Caribbean Treasures (available here) that was developed back in 2004 and still sells. Since I had many positive reviews about the gameplay of the original game, I decided to “copy” it on iPhone with some features that are unique to the mobile devices (like gravity and “draw on sand with your finger”).

Why sparrow?

Caribbean Treasures is my first project for the iPhone, and when I googled for a free game engine, most links were about the Cocos2D. In my opinion, however, that engine has too much features implemented which makes it too big and hard to learn. I browsed through some samples and it was obvious that it might take several days or weeks to learn that engine on the level that is required to make a game.

Then I found the Sparrow Framework.

I was immediately attracted with 3 facts: it’s completely free, it’s open source (and I can make changes to the source or browse through it to learn how it works), and it is very intuitive. It took just a few hours to make a main menu for the game, and this was my first experience with the game engine. So the choice was obvious: I could focus on game code without spending lots of time trying to figure out how to define objects, scenes, sounds and to bring that all together. In three days I had my first playable level, and that was pretty fast.

Obstacles along the way

It just has to be said: Sparrow has a much better support team than most commercial applications. Almost all problems that I had were already solved, so I just learned on the forum how to fix them. There was a problem with the “Draw on sand” feature that took me a day to solve with the help of the forum, and it turned out that it wasn’t a problem of the game engine but rather a problem of the OpenGL implementation on iDevices. It was related to the speed of rendering to textures, which is quite low.

During the work on Caribbean Treasures I also learned Objective-C, which was a new language for me. So I had lots of memory leaks in the initial builds that were fixed just before the release. But there really weren’t any big troubles making this game, and — what’s more important — there weren’t any problems with the game engine (I didn’t encounter any bugs or errors).

Conclusions

Sparrow is a basic framework. It doesn’t have any advanced features like a set of GUI classes (sliders, modal dialogs and so on) or scripting engines or tools like scene editors and so on. And that was exactly what I was looking for! Because from my experience, many additional features are making a game engine just harder to learn, adding a lot of bulk just to display a simple sprite on the screen. As a basic framework, Sparrow is just great! It’s very intuitive, easy to learn, and well organized. It has everything that one might need to develop a game. The quality support provided directly by the engine developers and users is also an important feature that should be considered by everyone who is looking for a game engine for their game. As for me, I have no doubt about the game engine that will be used in my next game. It will be the Sparrow Framework of course!

1 Comment