Sparrow iOS Game Framework
It’s a pure Objective-C iOS game framework. It’s built upon OpenGL for it’s rendering and OpenAL for the sound processing so it’s very fast rendering and has very rich multimedia support. The aspect that attracted me was it has been styled on ActionScript 3! I’ve been using it over the last two weeks and well…. I’m sold!
I’ve never cared much for Cocos2D. I’m not denying it’s a great framework and it’s proven itself with hundreds of games. Out of the box Cocos2D iPhone even packs many more features such as physics support with Box2D and Chipmunk, a Tile Engine and even a Particle Designer, there’s a whole lot of work gone in to Cocos2D. For me using Cocos2D always felt awkward, I didn’t like the naming conventions used, things didn’t always seem logical, it’s hard to put my finger on it but I never enjoyed using it and I ended up not diving headlong in to iPhone game development. Then I stumbled (not literaly…) upon Sparrow framework and while being a little reluctant at first I began building some simple tests for game mechanics and I love it! The syntax is what I expect, it reminds me of Flash / ActionScript 3. For example take a look at this example of an image:
// init of Class -(id)init { if (self = [super init]) { // add a Background image to the splash scree SPImage *bg = [SPImage imageWithContentsOfFile:@"Splash.png"]; [self.stage addChild:bg]; } } |
Or how about this tweening example:
- (void)performTween { // animates the playButton's alpha over 1.5 seconds SPTween *playTween = [SPTween tweenWithTarget:playButton time:1.5f transition:SP_TRANSITION_EASE_IN]; playTween.delay = 2.5f; [playTween animateProperty:@"alpha" targetValue:1.0f]; [self.stage.juggler addObject:playTween]; } |
Heck Sparrow even has it’s own EnterFrame to save you the hassle of setting up a CADisplayLink or NSTimers for your game loops:
- (void)someMethod { // add the EnterFrame event [self addEventListener:@selector(onEnterFrame:) atObject:self forType:SP_EVENT_TYPE_ENTER_FRAME]; } - (void)onEnterFrame:(SPEnterFrameEvent *)event { // Do something every frame NSLog(@"Hello Sparrow!"); } |
Sparrow does need some core features though, animated SPImage using Atlas Sprites would be good, I’m using my own concoction at the moment, it aint pretty! some on screen FPS etc but nothing major. In short, it’s a great framework, very young and streamlined (which is a GOOD thing!) and you should definitely give it a shot for your next project, if you love ActionScript it’s a fair bet you’ll take to Sparrow!
anton.

As an AS3 developer just getting into iphone/ipad development, I found sparrow to be the easiest framework to go with especially for us flash guys. Pretty much looked over the doc’s and code examples, for half a day and was up and running with a project that utilized sparrows common elements (textfields, images, events, graphics draw)in xcode by the afternoon. Very easy to understand as it imitates AS3 naming conventions.
Definitely a great frame work to pickup and go………Highly recommended to fast track learning and development.
September 9th, 2010 at 11:52 pm