Skip to content

TimHuza/Space-Ship_Battle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Space Ship Battle

A 2-player competitive shooting game built with Python and Pygame. Battle it out in space as Red and Yellow spaceships and blast your opponent with bullets to victory!

๐Ÿ“– About

Space Ship Battle is a local 2-player game where each player controls a spaceship on opposite sides of the screen. Players must move and shoot bullets to reduce the opponent's health. The game includes sound effects, health tracking, and a win screen.

โœจ Features

  • ๐ŸŽฎ Local multiplayer spaceship combat
  • ๐Ÿ’ฅ Bullet collision effects with sound
  • ๐Ÿ›ก๏ธ Health bars and win conditions
  • ๐ŸŽจ Space-themed background and ship sprites
  • ๐Ÿ”Š Background music and SFX support

๐Ÿ› ๏ธ Installation

Make sure you have Python 3 installed,

python --version

Then:

# Clone the repository
git clone https://github.com/yourusername/space-ship-battle.git

# Navigate to the project directory
cd space-ship-battle

# Install dependencies
pip install pygame

๐Ÿš€ Usage

To run the game:

python spaceship.py

Controls

  • Yellow Player

    • Move: W A S D
    • Fire: Left Ctrl
  • Red Player

    • Move: Arrow Keys
    • Fire: Right Ctrl

โš™๏ธ Configuration

You can tweak gameplay variables in the script:

VEL = 5  # Player movement speed
BULLET_VEL = 7  # Bullet speed
MAX_BULLETS = 10  # Max bullets on screen
SPACESHIP_WIDTH, SPACESHIP_HEIGHT = 55, 40

๐Ÿ–ผ๏ธ Assets

Make sure the Assets/ folder contains the following:

  • spaceship_red.png
  • spaceship_yellow.png
  • space.png (background)
  • Gun+Silencer.mp3 (firing sound)
  • Grenade+1.mp3 (hit sound)

All assets should be placed inside an Assets directory relative to the script.

๐Ÿงฐ Technologies

๐Ÿค Contributing

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

About

This was my first project on Pygame made in 2024. This game was so fun making and interesting. This game is Space Ship Battle, there is a firing sound, hit sound, background and more.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages