Space Shooter Game
Lesson Aims
During the course of this lesson, students should be able to create a side-scroller alien shooter game, with keyboard controls.
Prerequisites
For this lesson to work, students need to have a python 2
programming
environment ready, with pygame installed and ready to
import. Raspberry Pis with Raspbian come with these
prerequisites satisfied.
This lesson follows the “seperate text-editor & interpreter” model for writing
code, rather than an integrated IDE. So students are expected to have a text
editor and terminal open, and know how to run python on a specific .py
file.
Particular attention should be paid to which directory they are saving files,
which directory the terminal is in, and not using spaces in names.
Which text editor is used is up to the teacher, but at a minimum, something with syntax highlighting should be used.
Assumptions
- Running
python
will launch Python 2.X not Python 3.X.. If you are teaching using arch linux, or something else that uses python 3 by default, look out for this. This can usually be circumvented by running the commandpython2
instead ofpython
.
Attribution
All the images used in this lesson are either from opengameart.org, or were created by myself.
alien_1.png
- http://opengameart.org/content/space-shooter-top-down-2d-pixel-art - Public Domainalien_1_dead.png
- a modified version of the above image, also released under Public Domainbullet.png
- http://opengameart.org/content/bullet-collection-1-m484 - Public Domainship_down.png
,ship_normal.png
andship_up.png
- http://opengameart.org/content/space-ship-3d2d - License: Creative Commons Attribution 3.0 Unportedship_destroyed.png
- is a modified version of the ship based on the 3 images above and the explosion image found here: http://www.deviantart.com/art/Explosion-3-491196859