Skip to content

blackbat13/SpacePygameZero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Space Shooter

A simple 2D space shooter built with Pygame Zero as an educational project for learning game development in Python.

Gameplay

About

This project is designed to demonstrate core game development concepts using Pygame Zero — a beginner-friendly framework built on top of Pygame. The code covers:

  • Game loop — drawing, updating state, and handling input each frame
  • Actors — sprites with position, angle, and velocity
  • Collision detection — laser hits and player collisions
  • Randomness — UFO spawning and movement direction changes
  • Sound effects — lasers, explosions, shield hits, and game over
  • Animation — frame-based explosion sequences

Gameplay

Pilot your spaceship and destroy incoming UFOs before they collide with you. You start with 3 lives. The game ends when you run out.

Action Key
Rotate left A
Rotate right D
Accelerate W
Decelerate S
Shoot laser Space
  • Each UFO destroyed earns 10 points
  • UFOs wrap around the screen edges
  • A GAME OVER screen is shown when all lives are lost

Requirements

  • Python 3.x
  • Pygame Zero

Install dependencies:

pip install -r requirements.txt

Running the Game

python main.py

Project Structure

main.py          # All game logic
images/          # Sprites (ship, UFOs, lasers, explosions, lives)
sounds/          # Sound effects
requirements.txt

Assets

Sprites and sounds from Kenney.nl — free game assets.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages