Towers Defense game with ruby for COS10009 Custom program assignment
-
Download Ruby:
- Visit the official Ruby website to download Ruby for your operating system.
-
Install Ruby:
- Follow the installation instructions provided for your platform (Windows, macOS, or Linux).
- For Linux, you can also use a package manager, e.g.,
sudo apt install rubyon Ubuntu.
-
Verify Installation:
- Open a terminal and type:
ruby -v
- This should display the installed Ruby version.
- Open a terminal and type:
-
Install Gosu Gem:
- Open a terminal and run the following command:
gem install gosu
- Open a terminal and run the following command:
-
Verify Installation:
- Run the following command:
gem list gosu
- This should display the installed version of Gosu.
- Run the following command:
-
Download the Game Files:
- Clone the repository or download the ZIP file:
git clone https://github.com/Showwaiyan/Swin-towers.git
- Clone the repository or download the ZIP file:
-
Navigate to the Game Directory:
- In the terminal, navigate to the folder where the game files are located:
cd Swin-towers
- In the terminal, navigate to the folder where the game files are located:
-
Run the Game:
- Execute the main Ruby file:
ruby main.rb
- Execute the main Ruby file:
-
Wave Customization:
- Edit the
waves<number>.txtfile in the game directory.- You can create a new wave by increasing last wave number or,
- You can edit the wave based on existing wave file.
- Specify enemy species.
- Example format:
orc bee hound slime
- Edit the
-
Tower Settings:
- Open the
constant.rbfile to adjust tower attributes such as range, damage, and cost.
- Open the
-
Game Parameters:
- Edit the
constant.rbfile for global settings like screen resolution, starting currency, and difficulty scaling.
- Edit the
-
Test Changes:
- Save your modifications and relaunch the game to see your customizations in action.
Enjoy defending your towers and customizing your gaming experience!