Skip to content

A shooter game where 2 tanks try to destroy each other while avoiding obstacles.

Notifications You must be signed in to change notification settings

devorbs/tankers-game

Repository files navigation

Tankers - A Pygame Project

Project Overview

This project, "Tankers," is a game developed using Pygame. Its primary purpose is to reinforce the fundamentals of software programming and object-oriented programming (OOP) by implementing a fun and interactive game.

Features

  • Two-player tank game.
  • Tank movement and shooting.
  • Terrain generation and rendering.
  • Collision detection.
  • Health and score tracking.
  • Game over and restart functionality.

Technologies Used

  • Python
  • Pygame library

Installation

  1. Make sure you have Python installed on your system.

  2. Install the Pygame library using pip: pip install pygame

  3. Clone this repository: git clone https://github.com/devorbs/tankers-game.git

  4. Navigate to the project directory: cd tankers-game

  5. Run the game: python main.py

How to Play

  • Player 1 controls:

  • Move Up: Up Arrow Key

  • Move Down: Down Arrow Key

  • Move Left: Left Arrow Key

  • Move Right: Right Arrow Key

  • Shoot: Enter Key (from keypad)

  • Player 2 controls (if available):

  • Move Up: W Key

  • Move Down: S Key

  • Move Left: A Key

  • Move Right: D Key

  • Shoot: Spacebar

Game Rules

  • The objective of the game is to destroy the opponent's tank while avoiding their attacks.
  • Players can shoot bullets to attack their opponents.
  • Tanks have limited health, and resets when a player's health reaches zero.
  • The player who can stay alive for 3 rounds wins.

Acknowledgments

This project is inspired by the desire to reinforce programming fundamentals through practical application. It also serves as a fun way to learn about game development and software design using Python and the Pygame library.

Game Assets by Kenney Vleugels (Kenney.nl)

Author

License

This project is open-source and available under the MIT License.

About

A shooter game where 2 tanks try to destroy each other while avoiding obstacles.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published