/Spaceship-Game---byCodingcat

A fun and interactive space adventure game where you collect stars, avoid asteroids, and compete for high scores using Python and Tkinter.

Primary LanguagePythonMIT LicenseMIT

Spaceship-Game๐Ÿš€ - byCodingcatยฎ

Introduction

Welcome to the Spaceship Adventure Game! Navigate your spaceship to collect stars and avoid asteroids. Earn points for every star you collect. The game ends when you collide with an asteroid. Good luck!

Requirements

  • Python 3.6 or later
  • tkinter (usually included with Python)
  • Pillow library (to install, use pip install pillow)

Installation

  1. Clone the Repository

    git clone https://github.com/ShenalSen/Spaceship-Game---byCodingcat.git
    cd spaceship-adventure-game
  2. Install the Pillow library

    pip install pillow
  3. Ensure your directory structure looks like this:

    spaceship-adventure-game/
    โ”œโ”€โ”€ main.py
    โ””โ”€โ”€ images/
        โ”œโ”€โ”€ background.png
        โ”œโ”€โ”€ spaceship.png
        โ”œโ”€โ”€ star.png
        โ””โ”€โ”€ asteroid.png
    

Running the Game

  1. Navigate to the project directory.
  2. Run the game using Python:
    python main.py

Gameplay

  1. Start the Game: When you run the game, an intro message will prompt you to enter your username. If you leave it blank, your username will be "Player".
  2. Control the Spaceship:
    • Use the Left Arrow key to move the spaceship left.
    • Use the Right Arrow key to move the spaceship right.
  3. Collect Stars: Each star you collect adds 10 points to your score.
  4. Avoid Asteroids: The game ends if your spaceship collides with an asteroid.
Screenshot 1 Screenshot 2

Code Overview

  • main.py: Contains the entire game logic and UI setup using tkinter and Pillow for image handling.
  • images/: Directory containing all the required images for the game.

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix:
    git checkout -b feature-name
  3. Commit your changes:
    git commit -m "Description of your feature or fix"
  4. Push to the branch:
    git push origin feature-name
  5. Create a pull request detailing your changes.

Contact

For any questions or issues, please contact shenal.unc555@gmail.com or Contact@shenal.com

Enjoy the game!

ERD 45656642734324