TowerDefense
A downloadable game for macOS
Game Preview:
This project is a Tower Defense game developed in C++ using the SFML (Simple and Fast Multimedia Library) framework. The game involves placing towers to defend against waves of critters that move along a predefined path. The player earns coins by defeating critters and can use these coins to place new towers, upgrade existing towers, or sell towers.
Key Features:
- Critter Waves: Critters move along a path and the player must prevent them from reaching the end.
- Tower Placement: Players can place different types of towers on the grid to attack critters.
- Tower Upgrades: Towers can be upgraded to increase their effectiveness.
- Tower Selling: Players can sell towers to reclaim some of the spent coins.
- UI Elements: The game includes a user interface for tower selection, coin display, and mode indicators (upgrade/sell).
- Event Handling: The game handles various events such as window close, mouse clicks for tower placement, upgrades, and selling.
Dependencies:
- SFML: The game uses the SFML library for rendering graphics, handling events, and managing window operations.
Controls:
- Map Grid Check: The game ask for user to enter map dimensions to generate a grid.
- Mouse Click: Place towers, upgrade towers, or sell towers based on the selected mode.
- Upgrade Mode: Activate upgrade mode to upgrade towers.
- Sell Mode: Activate sell mode to sell towers.
Game Loop:
- The game runs in a loop where it processes events, updates critter positions, handles tower actions, and renders the game state to the window.
- The loop continues until the player closes the window or all critters have exited the screen.
Contributors:
- Omer Ege Daldal
- Amirali Dehestani
- Ilyad Hemmatjoo
Additional Information:
- The project includes various classes and functions to manage game logic, rendering, and user interactions.
- The code is organized to separate concerns such as critter movement, tower management, and UI handling.
- Images used for towers and critters are generated by Open AI's DALL·E 3
- Textures used for the map is obtained from SFML's official documentation https://www.sfml-dev.org/tutorials/2.4/graphics-vertex-array.php#example-tile-map
Enjoy defending your base and strategizing the placement and upgrading of your towers to achieve the highest score!
Download
Download
TowerDefense.zip 3.8 MB
Install instructions
The game comes as a package with the required libraries. However, the game is not signed with an Apple Developer ID so most computers won't open the game. To open it you have to bypass Gatekeeper and use Terminal by following the steps below:
- Download the file and open the file named "Main Game"
- Double click the "Assignment 1" exec file and you may see an error. If you have "Open Anyway" click it but if you don't have it open Settings -> Security and Privacy and scroll down. You will see an "Open Anyway" button.
- Then it will open a Terminal window but the game might not run perfectly. Close it and open a new Terminal window.
- Assuming you moved the folder to your Desktop use the command "cd Desktop/TowerDefense/Main\ Game " to move into the folder.
- Finally, use the "./MainGame" command to run the game.
- Enjoy your game of defending your tower.
Leave a comment
Log in with itch.io to leave a comment.