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

Sparrow in the Cocoa Magazine

I just found out that there is a new online magazine for Cocoa developers, and it released its very first issue just a few days ago: Cocoa Magazine.

Cocoa Magazine is a monthly periodical dedicated to the iOS and Mac development community, available as PDF download. I just read through the first issue (July 2011), and I found it to be very well executed — it’s just over a little too quickly, but that’s understandable as it’s really the very first issue.

What makes this interesting for Sparrow developers is that it contains a very well written article (by Matt King) that shows you how to create a simple arcade style game from scratch. Along the way, you’ll get to know many important concepts of Sparrow. It’s a very good introduction on the topic, especially if you’re new to Sparrow. Thanks for taking the time to write that article, Matt!

Here is the table of contents of the July issue:

  • “Sparrow Framework For iOS” by Matt King
  • “Talking Points” – an interview with developers at Retronyms
  • “Aggresive Image Caching” by Marcus S. Zarra
  • “Unit Testing” by Graham Lee

The Sparrow team wishes the Cocoa Magazine the best of luck for its future and is looking forward to the upcoming issues! :-)

0 Comments

Find it! 2

We are very happy to inform you that Find it! 2 hit the AppStore today!

Find it! 2 is our latest game and is a full-blown 100% single-malt Sparrow App that makes use of all the cool Sparrow features. It is built as an universal App and works on iPhones and iPads as well.

There is a truckload of things we’ve experienced and learned while developing Find it! 2 and I want to fill you in on some of them now:

 

SPRenderTexture for performance and visual quality

Find it! 2 has a – if I may say so myself – very cool main menu animation where Polaroids are flying and fluttering into the screen. To make this look interesting and cool every time the player enters the main menu the Polaroids are created on-the-fly and in a random fashion from a huge Texture Atlas in the back. Their flying paths and target positions are random too.

So every time the player opens the main menu Sparrow digs down into this Texture Atlas and unearths about 50-150 textures from it – depending on the hardware the game is played on. A polaroid consists of a background SPImage, an SPTextField and the photo itself, which is of course another SPImage. Leaving this as is would make OpenGL throw around a huge pile of objects ergo using a lot of CPU power just for the sake of a cool main menu animation. In addition to this each object would have an aliasing problem at its edges.

Using an SPRenderTexture instead is a very easy way to fix this problem:

SPImage *background = [SPImage imageWithTexture:bgTexture];
SPImage *image = [SPImage imageWithTexture:texture];
SPTextField *text = [SPTextField
  textFieldWithWidth:background.width
  height:10 text:@"SX-70 Gamua"];

SPRenderTexture *rendered = [SPRenderTexture
  textureWithWidth:background.width
  height:background.height
  fillColor:0xAAAAAA];

[rendered drawObject:background];
[rendered drawObject:image];
[rendered drawObject:text];

Instead of 3 SP* objects we now have a single rendered texture and the devices CPU has way less to do than before. Additionally rendering the Polaroids into a single texture also improves the visual quality of the whole thing, since textures get anti-aliased pretty good when you leave it to OpenGL.

 

Picasso wanted!

Find it! 2 by nature brings many many photos. Each photo has to feature several differences that can be found by the player. These differences of course have to be skillfully photoshopped into the original photos. Since we are way to slow (and bad) in any image manipulation application to do hundreds of photos ourselves, we got us some help.

If you are willing to spend some money on good artwork instead of fiddling around with the paint brushes yourself there is help: As many of you know ManiacDev has a great article on how to outsource game art to freelancers. There are many very skilled people out there and although it takes up time to find the right one for your job, it is totally worth it.

 

GameCenter and iTunes on shore leave

Find it! 2 features in-app purchases as well as a tight integration with Apple’s GameCenter, which both are awesome services for small game developers. As you well know the production servers and the development servers of these services are separated and you are working in a development “Sandbox” while you are coding your App. This makes sense in many ways and one is that development server load must not impact production performance.

However, the Sandbox is not always behaving like the production environment:

  • First of all: It’s slower. Authenticating against GameCenter in the Sandbox takes way longer than authenticating against the production server. Don’t freak out if your trunk build takes several seconds to authenticate the player against the Sandbox server. Funny thing is having a slow development Sandbox has an advantage: If your code works quite okay in the Sandbox it will work very well in production. :-)
  • Second: It’s not always available. While the production servers are virtually online 24/7 the Sandbox servers were down pretty often while developing for Find it! 2. Sometimes the whole server is down, sometimes just some services like the GameCenter matchmaking do not answer. Hint: If your SKProductsRequest does return an empty list instead of your in-app purchases, you may be experiencing exactly what I am talking about.
    So don’t wreak code havoc just because you are unable to authenticate against the GameCenter sandbox. It will be a bug in your code many times, but there is always the chance that the Sandbox is down. ;-)
 

So long, and thanks for all the fish

That’s it for today! Thanks for reading and if you are interested what Sparrow does for Find it! 2 find it (no pun intended) out right here.

5 Comments