Find it! 2

Holger Weissböck on June 5, 2011

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.

"Polaroids"

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.