Skip to Main Content
Python for Kids, 2nd Edition
book

Python for Kids, 2nd Edition

by Jason R. Briggs
November 2022
Beginner content levelBeginner
368 pages
6h 47m
English
No Starch Press
Content preview from Python for Kids, 2nd Edition

14Developing the Mr. Stick Man Game

Image

Now that we’ve created the images for Mr. Stick Man Races for the Exit, we can begin developing the code. The description of the game in the previous chapter gives us an idea what we’ll need: a stick figure that can run and jump and platforms he must jump to. We’ll write code to display the stick figure and move it across the screen, as well as to display the platforms. But before we write this code, we need to create the canvas to display our background image.

Creating the Game Class

First, we’ll create a class called Game that will be our program’s main controller. The Game class will have an __init__ function ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python Cookbook, 3rd Edition

Python Cookbook, 3rd Edition

David Beazley, Brian K. Jones
High Performance Python, 2nd Edition

High Performance Python, 2nd Edition

Micha Gorelick, Ian Ozsvald

Publisher Resources

ISBN: 9781098141400