O'Reilly logo

Invent Your Own Computer Games with Python , 4th Edition by Al Sweigart

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

20USING SOUNDS AND IMAGES

image

In Chapters 18 and 19, you learned how to make GUI programs that have graphics and can accept input from the keyboard and mouse. You also learned how to draw different shapes. In this chapter, you’ll learn how to add sounds, music, and images to your games.

Adding Images with Sprites

A sprite is a single two-dimensional image that is used as part of the graphics on a screen. Figure 20-1 shows some example sprites.

Figure 20-1: Some examples of sprites

The sprite images are drawn ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required