May 2, 2010

Creating a game menu

Since the release of Sparrow, we have received quite a lot of positive feedback - thanks a lot for that, guys! There are already a number of people working on games that are powered by Sparrow. If you are a little bit like me, you will put most of your...

April 13, 2010

Collision detection

Collision detection is a substantial part of almost all games. Unfortunately it is also a part where lots of CPU cycles can get lost, resulting in choppy game-play and short battery life. In order to keep calculation costs down, it helps to exit collision detection code as soon as possible....

April 7, 2010

A simple way to let Xcode stop on an error

This post is not Sparrow-specific, but I thought this could come in handy for any Xcode developer. Developing an application is always more or less trial and error. You write some code. You test it. You write more code. You test it. This goes on for a long while. During...

March 9, 2010

How to use landscape mode

When you create a new game in Sparrow, it uses portrait mode by default. Theoretically, you could rotate the Cocoa view object that Sparrow renders into - but that's not recommended, as it slows down rendering quite a bit. OpenGL contents should always be rendered in portrait mode on the...

February 16, 2010

Using bitmap fonts

Almost any game will have to display some text sooner or later. Sparrow makes it easy to do so: SPTextField *textField = [SPTextField textFieldWithWidth:300 height:100 text:@"This is some text."]; textField.fontName = @"Georgia-Bold"; textField.fontSize = 18; textField.hAlign = SPHAlignCenter; // horizontal alignment textField.vAlign = SPVAlignCenter; // vertical alignment There are quite...

February 12, 2010

Using a texture atlas

When using OpenGL on the iPhone (you do when you use Sparrow), you can speed up rendering quite a bit when you group your textures in one big texture atlas. The reasons: In OpenGL, there's always one texture active at a given moment. Whenever you change the active texture, a...

February 10, 2010

Sparrow forum online

Hello everyone, my name is Holger and I am, amongst other things, responsible for the Sparrow website. In order to have a place where we can have discussions and answer your Sparrow questions, I would like to draw your attention to the new Sparrow Forum, which went online just a...