31.1. Bitmaps

For a professional-looking program you will often want to use bitmaps. We will talk about two uses for bitmaps. First we’ll discuss using bitmaps as background images for your program. And second we’ll talk about using small bitmaps as sprites to represent your moving critters. But first we need to say a bit about bitmaps in general.

A bitmap can be something that you draw inside a paint program, a photograph that you scan, or something that you grab off the web. In taking something off the web, however, be sure that it is public domain. If you use copyrighted images in your software, then you’re not going to be able to legally distribute your program, and your work is effectively wasted.

Bitmaps come in various kinds of file formats, ...

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.