PyGame Xmas Special

Grey overlay

Pink

Green

Blue

Cream

Liliac

Purple

Yellow

1 Objectives

Developing Programming Development learning strand, specifically:

  • Understanding and using loops in a game development
  • Learning using if statements (conditionals) to branch instructions in a solution
  • Learning what computers events are and how they are used in game development
  • Understanding how sequences of instructions are put together logically in solving a given problem

2 The game: Santa picks up moving presents

The Game Play

  • Santa's sleigh can move up and down along the left side a game screen
  • Santa's move is controlled by UP and DOWN arrow keys
  • A present is randomly placed at the right edge of the screen
  • The present is moving at an initial speed towards the left of the screen
  • When Santa collides with the present, the present disappears and Santa gets one point
  • Another present appears at the right edge, but with increased speed
  • The game is over when Santa misses a present

The Game Skeleton Code and Assets

  • Right click and choose save as to download the skeleton code to your home drive, computer science folder
  • Right click and choose save as to download the Santa sleigh image to the same place
  • Right click and choose save as to download the present image to the same place
  • After you have downloaded the above three files to the same location, open the python skeleton code by right click and choose to edit with IDLE.
  • Follow the instructions on each task to complete the game. Your completed game should look like this: