Video Tutorial: Python Spacewar Game
Spacewar! was one of the earliest videogames, originally created on a PDP-1 in 1962! The original version did not have gravity or hyperspace options, but later versions did. This tutorial walks you through the steps for creating a somewhat similar game using nothing more than the built-in turtle module. Note: this was coded in Python 2.7 on a Mac - other platforms, such as Linux, run much faster so you would need to add a delay to the main game loop.
We will be making a somewhat similar program - but as this tutorial is for relative beginners, we will simplify things a bit.
In this program you are tasked with destroying the red circles (your enemies) while avoiding shooting the blue squares (your allies).
Here is what the game will look like:
The tutorial is in 10 stages as follows:
Advanced Version (SpaceWar-Demo.py)
The SpaceWar Demo version has more realistic spaceship physics, a splash screen and other graphics, and enemy and ally bases.
It looks like this:
Recent blog posts
- Simple Python Game Tutorial Using Classes
- Video Tutorial: Python Spacewar Game
- Video Tutorial: Python To-Do-List (GUI Version)
- Video Tutorial: Simple Space Invaders Clone
- Video Tutorial: Python Functions with Turtle Graphics
- Video Tutorial: Python Guessing Game (GUI Version)
- Global Codeathon Scratch Tutorials
- Video Tutorial: A Simple Python Turtle Graphics Game
- Video Tutorial: Tic-Tac-Toe in Python
- In Favor of Standardization in Ed Tech