Snapper
Your job as a wildlife photographer means that you need quick reflexes to get the best shots. Have you got what it takes to snap some photos of the elusive forest wildlife? You have to be quick because they don’t hang around!
Learn to code the Snapper arcade game in Python. This free Python coding project includes all of the code, images and audio files required.
Starter Code Files
Download “Starter Python File: Snapper” File size: 169 B
Download and unzip this starter Python code file to your Snapper project folder
Images and Audio
Download “Images and audio for Snapper” File size: 260 KB
Download and unzip these image and audio files to your Snapper project folder
Book of Code
Download “Book of Code: Snapper” File size: 507 KB
Copy the Snapper program from the Book of Code into your Python IDE
Video Tutorials
1. Integer Variables 2
An integer is a whole number. An integer variable is a variable which stores a whole number. This tutorial shows how the lives and level integer variables are used in Snapper.
Watch first: Forest Bomber Integer Variables
Difficulty: 2
2. Boolean Variables 2
A boolean can have one of two values: True, or False. A boolean variable is a variable which stores either True or False.
This tutorial shows how the boolean variables are used when writing the code for an arcade game in Python.
Watch first: Forest Bomber Boolean Variables
Difficulty: 2
Buy the book
Snapper is one of the four games covered in the book Game Programming with Code Angel, available on Amazon now.
3. Constants
A constant is a value in a program which does not change. This tutorial explains how Python constants are used in Snapper.
Watch first: Forest Bomber Variables
Difficulty: 1
4. Random
Random values are essential when coding games, otherwise the game would become boring and predictable.
In this tutorial you will learn how Snapper uses the random.choice() function to pick a new animal at random.
Watch first: Snapper: Dictionaries
Difficulty: 3
5. Mouse Events
In Snapper the player controls the camera by moving the mouse, and takes a photograph by clicking the mouse button.
This tutorial explores the Pygame code which handles mouse events.
Watch first: Forest Bomber Making Decisions
Difficulty: 3
6. Elif and Else
The Python if statement is used to make a decision in the program code.
The decision-making process can be extended by using the elif and else Python statements.
Watch first: Forest Bomber Making Decisions
Difficulty: 3
7. Dictionaries
A Python dictionary is a way of storing data items. Each dictionary item also has a key to identify it.
In this tutorial you will learn how to use a dictionary to store the data relating to each animal in Snapper.
Watch first: Forest Bomber Lists
Difficulty: 4
8. Functions
In this tutorial you will learn how to break a Python program down into smaller blocks which are called functions.
Watch first: N/A
Difficulty: 4
All-new Fire HD 10 Tablet | 10.1″ 1080p Full HD display, 32 GB, Black, available on Amazon