Druidic Defense is a conventional Tower Defense game with different towers, enemies, maps and enemy waves.
The game currently supports the below features:
- 10 rounds of play
- 6 types of towers
- 4 types of enemies
- 2 different maps
- Towers can be bought, sold and upgraded during/in-between rounds
- For certain towers, player can decide which enemy will be shot (first/last/close/strong)
- Some enemies are armored and take more damage from certain towers
- Maps have obstacles (trees, rocks, water, path) where towers cannot be placed
- Collisions are visible by change in color of a tower's target range
- An options menu with game settings
- Rounds can be set to start automatically in the options and pause menus
- Maps and rounds are not hardcoded but allow for easy customization
- Gameplay can be paused and then resumed again
- Groovy background music
- Colorful artwork
- Julius Järvilinna
- Tousif Zaman
- Tomi Mikkola
- Konsta Kemppainen
First you need to clone the repository and download all the required dependencies (git submodules). This can be achieved with Git by doing the following:
- Open your terminal in the directory where you want to download the project.
- Run
git clone --recurse-submodules [email protected]:cpp-autumun-2021/tower-defense/tower-defense-5.git
in the terminal.
The rest is platform-specific. Scroll down to see instructions for your platform.
Tested on Windows 10.
- Install CMake from the CMake website.
- Install Visual Studio 2022.
- Install the
Desktop development with C++
workload. - Make a build folder in the project directory.
- Once you have a terminal open in the build folder, run
cmake ..
- If the files are created successfully, open
TowerDefense5.sln
in Visual Studio 2022. - Build and run the project in Visual Studio 2022.
Tested on Ubuntu 18.04.
- Run
sudo apt update
in the terminal. - Install toolchain (GCC, make, etc.) by running
sudo apt install build-essential
in the terminal. - Install CMake by running
sudo apt install cmake
in the terminal. - Open a terminal in the project directory.
mkdir build
- make abuild
directory inside the project.cd build
- enter the build directory.cmake ..
- run CMake and generate a makefile insidebuild
.make
- use the makefile to build the project../TowerDefense5
- finally, run the executable generated insidebin
.
We use clang-format with Google C++ style guide. There are shortcuts to invoke the formatter on the project source depending on the IDE/editor used.
- In Visual Studio, open a source file and hit
Ctrl+K, Ctrl+D
to apply the formatting. - Refer this to set up clang-format for VSCode. Open a source file and hit
Ctrl+Shift+I
to apply the formatting.
Our project uses Doxygen to document source code. To be able to generate the documentation from this repository, you need to install Doxygen. The compilation steps mentioned earlier take care of generating the documentation as well. The documented output is generated inside doc in a dedicated folder as an HTML file. It is also possible to generate a PDF of the entire project, start by first installing PDFLatex for your OS and then following the below steps.
cd tower-defense-5 # enter project root directory
mkdir build && cd build # make a build directory
cmake .. # run CMake
make # make Doxyfile along with sources
cd doc/doc_doxygen/latex # enter the directory with latex (.tex) sources
make # build .tex files to get .pdf using pdflatex
We use GoogleTest to write unit tests. The CMakeLists.txt
takes care of installing the necessary dependencies and generates an executable for all unit test sources present inside tests
directory. Run this executable
to see the status of unit tests (passed/failed).
cd tower-defense-5 # enter project root directory
mkdir build && cd build # make a build directory
cmake .. # run CMake
make # make tests along with sources
../bin/TowerDefense5_tests # run tests executable from executables directory
The project repository at the top-level is organised as the following tree:
|__assets/
|__bin/
|__build/
|__doc/
|__include/
|__libs/
|__plan/
|__src/
|__tests/
|__CMakeLists.txt
|__Meeting-notes.md
|__README.md \
Group members used the git repository to push work on the project, making commits to different feature branches which would then be merged to a master branch through a merge request (MR). The MRs added by an author were reviewed by other members and merged by the author after correcting any comments/feedback received. We followed a clean progress by adding descriptive commit messages and details wherever necessary. Project related communications were handled over a Telegram group.
Our project group met weekly (Tueday evenings at 6pm) to discuss the below points:
- What each member has done during the week
- Are there challenges or problems? Discuss the possible solutions
- Plan for the next week for everyone
- Deviations and changes to the project plan, if any
- After each meeting, the meeting notes were committed to the project repository in the
Meeting-notes.md
file.