Chapter 13

Creating Graphics with Pygame

You can combine Pygame's basic features with the standard features of Python to create simple games.

Understanding Graphics and Animation

Understanding Sprites and Images

Get Started with Surfaces

Define Colors

Draw Shapes

Animate an Object

Bounce a Shape

Draw Text with Fonts

Load and Show an Image

Create a Sprite Class

Check for Sprite Collisions

Create a Breakout Game

Share Your Games

Understanding Graphics and Animation

Pygame is designed to make graphics and animation easy. Most games spend most of their time responding to user events, drawing a screen full of graphics, and repeating this loop over and over. Each repeat redraws everything on the screen from scratch.

Understanding Surfaces

A surface ...

Get Teach Yourself VISUALLY Raspberry Pi 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.