Skip to content

Space Defender is a simple arcade-style space shooter game where you protect Earth from incoming space junk.

Notifications You must be signed in to change notification settings

weebNeedWeed/space-junk-defender-q-cli

Repository files navigation

Space Defender

Space Defender is a simple arcade-style space shooter game where you protect Earth from incoming space junk.

Game Objective

Your mission is to defend Earth from dangerous space debris. If too much space junk hits Earth or if you collide with space junk yourself, the game ends.

How to Play

Controls

  • Left Arrow: Move your spaceship left
  • Right Arrow: Move your spaceship right
  • Space: Shoot bullets
  • R: Restart the game after Game Over

Game Elements

  1. Player Spaceship: You control a spaceship at the bottom of the screen.
  2. Earth: Represented by a bar at the bottom of the screen. Earth has 100 health points.
  3. Space Junk: Random debris that falls from the top of the screen. Larger pieces do more damage to Earth if they hit.
  4. Score: You earn 10 points for each piece of space junk you destroy.

Game Rules

  • The game ends if:
    • Earth's health reaches 0
    • Space junk hits Earth 3 times
    • Your spaceship collides with space junk (unless you have a shield)

Power-ups

When you destroy space junk, there's a 20% chance of a power-up appearing. There are three types of power-ups:

  1. Double Bullets (Blue): Shoot two bullets at once for 5 seconds
  2. Speed Boost (Yellow): Increases your spaceship's movement speed for 5 seconds
  3. Shield (Green): Protects your spaceship from collisions for 5 seconds

Game HUD

The game displays important information:

  • Score (top left)
  • Earth Health (top left, with health bar at top right)
  • Junk Hits counter (shows how many pieces of junk have hit Earth)
  • Junk Count (shows current/maximum junk on screen)
  • Active power-ups (bottom right corner)

Installation

  1. Ensure you have Python and Pygame installed
  2. Run the game with python space_defender.py

Tips for Success

  • Prioritize destroying larger pieces of space junk as they do more damage to Earth
  • Collect power-ups to gain temporary advantages
  • Try to keep the number of junk objects on screen manageable
  • Watch out for your spaceship's position - avoid collisions!

Good luck defending Earth, Space Defender!

About

Space Defender is a simple arcade-style space shooter game where you protect Earth from incoming space junk.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published