QA


Q&A

Q1:

Is there some reason why all the examples in this hour use four frame images to demonstrate frame animation?

A1:

No. In fact, there aren't any rules whatsoever regarding the number of frame images that are ideal for frame animation. It all comes down to what you're trying to accomplish with the animation. The more frames you use, the smoother and more realistic the movement will tend to be. On the other hand, creating a lot of frames requires a great deal of work and also tends to hog memory. So, it's worth striking a balance between nice visual effects and efficiency. Generally speaking, I'd try not to go over sixteen frames for most of your animated sprites . And quite likely you'll be able to achieve most effects in eight frames or fewer.

Q2:

What is the unit of time measurement used by the frame delay of an animated sprite?

A2:

Unfortunately, the frame delay of an animated sprite doesn't have a specific unit of measurement, such as seconds or milliseconds . The frame delay is expressed in game cycles, not time. So, if you set a frame delay of 10, it means that the frame of the sprite will be changed every 10 game cycles. This can therefore have a dramatically different impact on a game if you change the game's frame rate. For example, changing the frame rate from 30 to 15 will slow down the sprite's frame animation by half, which is actually what you would expect when you consider that the frame rate drives the speed of the entire game.



Sams Teach Yourself Game Programming in 24 Hours
Sams Teach Yourself Game Programming in 24 Hours
ISBN: 067232461X
EAN: 2147483647
Year: 2002
Pages: 271

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net