January 2022
Beginner to intermediate
416 pages
10h 21m
English
These chapters introduce you to pygame, an external package that adds functionality common to GUI programs. Pygame allows you to write Python programs that have windows, respond to the mouse and keyboard, play sounds, and more.
Chapter 5 gives you a basic understanding of how pygame works and provides a standard template for building pygame-based programs. We’ll build a few simple programs first, create a program that controls an image with the keyboard, then we’ll build a ball-bouncing program.
Chapter 6 explains how pygame can best be used as an object-oriented framework. You’ll see how to rewrite the ball-bouncing program using object-oriented techniques, and develop simple buttons and text ...