1

I have seen animation, and i can't figure out how to do something like in this video(youtube). I want to discuss how it's made. I don't think that they're using sprites.

I have one idea how to do this: for example i want to create animation of "walking" animal (when animal moves, he's legs "runs" moving animation), i should create customView with imageView of animalBody 3 and two imageViews of animal legs 2. Then i make hard coded animation of moving legs and voila, i have custom animation. When i move customView, then i should start animation of legs. But is there better approach to do this? Thanks!

enter image description here enter image description here

Vlad Z.
  • 113
  • 4
  • Your question would be stronger if you explained what was occurring in the video and why you don't think sprites are being used. –  Oct 15 '13 at 15:16

1 Answers1

1

I'm not an IOS expert by far, but if it was me doing this, here's what I'd try to do:

  • Decide if you really want to have separate parts of your creature animated separatedly at the code level, or if it suffices to just make 1-animation sprites, each containing the whole creature. Here's what I mean:

    What is this animation part of? Is it part of a game? If so, will the creature in question do multiple kinds of running? Like maybe run and wave his arms, run and throw bananas, etc? If yes, then you may benefit from having a separate set of sprites for the running legs, and a different separate set of sprites for each of the arm-flailing and banana-throwing actions. Then you can combine them to achive full animations

    If on the other hand this guy will only run one way all the time (maybe it's just a cute loading animation), then you'll simplify your code and general project if you make animation sprites each containing the entire creature pose of running animation.

  • You'll need a way to pace the animation aka have it run at the same rate/speed on any device, no matter how powerful that device is. Normally, if you want to do it by hand you'd do a game loop. However I'm pretty sure IOS already comes with built in tools for making simple sprite based animations (like Android does), or (I've just googled this), far more fancier ones like : Sprite Kit. It's up to you do decide how you'll go about "pacing" your animation. My advice is to first see if you can't already use an existing IOS framework/library, before going into manual coding on this.

Shivan Dragon
  • 4,583
  • 5
  • 24
  • 31