Speedy Sprites
and
Awesome Animations

Into the second dimension: Sprites
With this article, we go screaming from the first into the second dimension. We are progressing into more complex subject, but it is just starting to get fun. Here, we define the sprite structure and get some miscellaneous procedures out of the way before we jump into the details of sprites.

Getting and Putting sprites
In this article, we jump head first into implementing sprites. The data structures that were developed in the last article are put to use and new routines are developed. Routines that capture a sprite from the screen and draw a sprite to the screen are sped into routines that are both practical and useful.

Clipping Rectangular Sprites
The biggest problem with the routines developed in the previous article is the fact that you can't clip them to a region. Because of this, they are practically useless for games. When a sprite goes near the right edge of the screen, it will wrap around to the left side of the screen. If you have a border around your screen, it will destroy your border. Because this is not good, here we will address the issue of clipping sprites.

Alternatives:

RLE Sprites
This article shows the possiblity of using other algorithms of storing data. By storing data in strips, optimizations can be made in the drawing of data and in the amount of storage required.

Clipping RLE Sprites
Here, we attack the interesting problem of clipping RLE sprites. It turns out that it isn't as big of a problem as it originally seems. Clipping RLE sprites doesn't have to take a lot of time, but we can make some optimizations by changing our structures slightly.

Compiled Sprites
By storing the data that makes up the sprite as machine code, you can achieve very fast drawing speeds. The downside is that the amount of data that needs to be stored is much higher than for other types of sprites. The tradeoffs and an implementation is discussed here.

Manipulations:

Saving, Loading, and Copying
With the ability to save and load a sprite, you are given a number of different options. Instead of having to regenerate the data in a sprite at run time, it can be done ahead of time and loaded from disk at run time. This is how all good programs are written. In this article, we examine some fundemental procedures.

Animation:

Double Buffering and other useful things
In our previous examples, we have found that there is an unexceptable amount of flicker present. This article examines one great way of solving this problem: Double buffering.