views:

915

answers:

2

What is the easiest and most practical way to implement smooth frame-based animation on the iPhone? I know that image sequences are easy to do, but if I have say 30 images flashing per second (30 fps) for 5 seconds, will it freeze up? Are there massive memory implications with this method?

I'm designing a game that will be mostly static, but there will be animations for some of the user actions. I'm hoping that OpenGL (etc.) won't be necessary.

A: 

This question needs to be more clear. Are you trying to display a sprite based animation? Or animate an image along a path? Or both?

If you have a series of images to animate, using UIImageView's animationImage is an easy way to go about it, although it is probably not efficient enough for a full scale game.

Steven Canfield
I've clarified the question to be a little bit more direct. Thanks Steven.
James Skidmore
+1  A: 

I'd recommend looking at the Cocos2d-iPhone open source game engine.

Using an AtlasSprite it should be relatively straight forward to achieve the result you want.

CynicismRising
Interesting — I'll take a look into Cocos2d-iPhone and mark your question as the correct answer if it's what I need. Thanks!
James Skidmore