This repository contains the source code for a custom Space Invaders game, created using Python and the Pygame library. The game is inspired by the classic Space Invaders arcade game, featuring a unique design, challenging gameplay, and nostalgic sound effects. The game was genereated using ChatGPT-4. Graphics was generated using MidJourney. See backstory for the ChatGPT dialog.
-
Ensure you have Python 3.6 or newer installed on your system. You can check your Python version by running
python --version
in your command prompt or terminal. -
Install the Pygame library using the following command:
pip install pygame
- Clone this repository to your local machine:
git clone https://github.com/quaat/ai_space_invaders.git
- Navigate to the project directory:
cd ai-space-invaders
To start the game, run the following command from within the project directory:
python invaders.py
Use the arrow keys to move your spaceship left and right, and press the spacebar to shoot at the alien invaders. Earn points by shooting down alien ships and survive as long as possible!
- Alien invaders moving horizontally and gradually descending towards the player's spaceship
- Player spaceship movement and shooting controls
- Welcome screen with the option to start the game or exit
- Resizable images and game elements
- Shields to protect the player's spaceship
- Sound effects for shooting, hitting alien ships, and player death
- Fullscreen mode toggling
- Increasing difficulty as the game progresses
Contributions are welcome! If you have any ideas or suggestions to improve the game, feel free to create an issue or submit a pull request.
- Fork the repository
- Create a new branch with a descriptive name (e.g.,
git checkout -b feature/new-alien-type
) - Commit your changes (e.g.,
git commit -m "Add a new alien type"
) - Push your changes to the branch (e.g.,
git push origin feature/new-alien-type
) - Create a pull request
This project is licensed under the eMIT License. See the LICENSE file for more information.
The sound effects are from the classic arcade game Space Invaders released in 1978 by Taito.