Objective-C and Animation Images

Started by
-1 comments, last by Rancorb 11 years, 3 months ago

I'm after some help in optimising the way I handle images in my game (Aeolus, on the iPhone app store).

At the moment I use a number of images to display hot air balloons as the player pushes them around the screen. The balloon tips in the direction it's pushed and there are 17 images used for the effect.

Currently I just load the images using [UIImage imageNamed:@"red-balloon-<xx>"] as needed, partly because the performance appears ok and partly because I read somewhere that method stores images for later use (and they're used a lot).

[attachment=13077:chapter 1-small.png]

This isn't the only layer of images, in total there are four layers for each balloon on screen:

  • The balloon itself (17 images)
  • A symbol on top of the balloon (17 images)
  • Ropes (4-8 images depending on type)
  • Basket (17 images)

While this works pretty well (I tested on my iPhone 3GS), it always seemed like a lot of images, especially as there are currently four different types of balloon and I'm looking to expand the game. Is there a more efficient way to handle this sort of image use / animation in Objective-C?

If anyone could point me in the right direction for what to read up on it would really help.

Cheers,

Tim

Tim Cooper - software developer, project manager and occasional iOS app developer.

Creative Shadows Ltd - My hobby company website

This topic is closed to new replies.

Advertisement