Sprite Animation Sprite - A Sprite Is A Single Graphic Image That Is Incorporated Into A Larger Scene So
Sprite Animation Sprite - A Sprite Is A Single Graphic Image That Is Incorporated Into A Larger Scene So
Sprite - A sprite is a single graphic image that is incorporated into a larger scene so
that it appears to be part of the scene.
Animation - The process of changing images in quick succession to give the illusion
of movement is called animation.
Sprites are a popular way to create large, complex scenes as you can
manipulate each sprite separately from the rest of the scene. This allows for greater
control over how the scene is rendered, as well as over how the players can interact
with the scene. It is not uncommon for games to have tens to hundreds of sprites.
Loading each of these as an individual image would consume a lot of memory and
processing power. To help manage sprites and avoid using so many images, many
games use sprite sheets.
Sprite sheet
When you put many sprites into a single image, you get a spritesheet.
An example of a shritesheet
Spritesheets are used to speed up the process of displaying images to the screen; It
is much faster to fetch one image and display only a part of that image than it is to
fetch many images and display them.
Spritesheet animation is nothing more than taking a spritesheet and changing which
sprite is rendered in quick succession to give the illusion of movement, much like a
film projector displaying a movie.
Parts of a Spritesheet
Spritesheets are made up of two parts: frames and cycles
A frame is a single image (or sprite) from the spritesheet. Going back to the
Muybridge's horse example, each picture of the horse in the image would be a
frame. When the frames are put in an order that creates a continuous movement, it
creates a cycle. Putting the photos of the horse in the order that they were taken
produces a "run" cycle since the horse is running (as opposed to a "walk" or "idle"
cycle).