9.1. Kinds of sprite

‘Sprite’ is a word traditionally used in computer game programming for the little character images that move around. Normally, computer game sprites are based on bitmaps, and we do indeed have a cSpriteIcon child of the cSprite class that uses bitmap images.

We also have some geometrical sprite objects. The cSprite child classes, cPolygon and cSpriteCircle, draw polygons and disks, respectively. Geometrical objects have the virtue of being scale-independent, crisp-looking, and lightweight in terms of memory use. Another good thing about them is that they can be easily rotated. Bitmaps can be rotated in OpenGL graphics, but not in Windows graphics.

Exercise 9.11 discusses how to create sprites of a variety of standard 3D ...

Get Software Engineering and Computer Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.