Tower Defence Game
Archive
Python and Pygame tower-defence project.
Tornipeli
This is a Tower Defense game developed as a software project for the CS-A1121 Ohjelmoinnin peruskurssi Y2 course using Python 3.

About
In this game, monsters move along a fixed path and get stronger over time. Players can place towers that use lasers to damage the monsters. The game includes a graphical user interface (GUI) that shows the player's current gold balance, elapsed time, and remaining lives.
Installation
Prerequisites
- Python 3: Ensure you have Python 3 installed. You can check this by running
python3 --versionin your terminal. - Pygame: Install the Pygame library by running:
pip install pygame
Steps
-
Clone the repository:
git clone https://github.com/vieteri/Tornipeli.git cd Tornipeli -
Run the game:
python3 main.py
Usage
- Start the game: Run
python3 main.pyto start the game. - Place towers: Click on a tower icon and then click on an available spot (white square) to place the tower.
- Earn gold: Defeat monsters to earn gold, which can be used to place more towers.

Deployment
To deploy the game, you can package it using tools like pyinstaller to create an executable:
-
Install pyinstaller:
pip install pyinstaller -
Create an executable:
pyinstaller --onefile main.py -
Distribute the executable: The executable will be located in the
distfolder. You can share this file with others to run the game without needing to install Python or Pygame.
Contributing
Feel free to fork this repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.