Year 9 - Term 2 C

The focus this term is on learning to use Pygame to create a basic Windows based game.

The Pygame library is probably the most well-known python library when it comes to making games. It’s not the most advanced or high level library, but it’s comparatively simple and easy to learn. Pygame serves as a great entry point into the world of graphics and game development, especially for beginners.

The Pygame framework includes several modules with functions for drawing graphics, playing sounds, handling mouse input, and other things that you’ll need while developing games in Python.


Introduction to PyGame

What is Pygame?

Pygame is a “game library” - a set of tools to help programmers make games.  Some of these things are:

Game Loop

At the heart of every game is a loop, which we call the “Game Loop”. This loop is constantly running, over and over again, doing all the things that are needed to make the game work. Each time the game goes through this loop is called a frame.

You will be using PyCharm for your PyGame project.  Find and launch PyCharm on your Computer.  Watch this Video


How to install Pygame in PyCharm



Introduction to Pygame

Now do This:

Check that you have your Term 2 PyGame ProveIT.  Add your name to the front page.  Work through the Presentation above and add definitions for  the keywords in your ProveIT.  Complete Slides 2 - 7.

Stop at slide 8 and type in the code and test it, update your ProveIt.  The rest of the slides explain the code, read it carefully.

You have to type your code exactly as it is displayed.  Capital, spaces, underscore and indentation must all be exactly as shown or your code will not run as expected or will give you an error.

2 - Moving objects

Creating a platform game.

This series of tutorials will teach you how to create your own platform game. 

Now try these tutorials

Get Started in Pygame in 10 minutes! (1).mp4

A basic game - game instructions start at 0:40

step-by-step car game.mp4

A car driving game

Now work your way through the video presentations below, there are also text documents to support you. Remember to update your ProveIt slides before the end of every lesson.

1-Game Development 1-1_ Getting Started with Pygame.mp4
Pygame Lesson 1-1: Getting Started
2-Game Development 1-2_ Working with Sprites.mp4
Pygame Lesson 1-2: Working with Sprites
3-Game Development 1-3_ More About Sprites.mp4
Pygame Lesson 1-3: More About Sprites

Kids can Code : PyGame Tutorial - Space Shooter (SHMUP!) - click here

Learning Pygame by making Pong.mp4

Create a Pong Game

Additional PyGame Resources

0. Games design
1. Creating a display surface
2. Drawing on the display
3. Blitting images
4. Blitting (copying) text
5. Adding sound effects and music
6. Discrete keyboard movement
7. Mouse movement
8. Continuous keyboard movement
9. Movement restrictions and alternative keyboard mapping
PyGame CS Prove it - Term 2C

This is the PyGame CS PRoveIT, your teacher will issue you a copy of the document on Google Classroom.