The course project of "Advanced Programming" in the fall semester of 2021: A simple tower defense game based on the Qt library
Demos built with Github Actions are available for download
Using Qt's Graphics View framework
-
The blue box, the
MainWindow
, represents the main window interface of the application -
The green box indicates that the current class is a custom base class inherited from Qt, and the black box is its corresponding subclass.
-
Tower
andEnemy
are derived classes that inherit fromGameItem
(which abstracts the common features of towers and enemies to a greater extent) -
The green arrow indicates that the pointed end is a member of the other end, which is a parent-child relationship at the drawing level or at the object organization level (similar to aggregation)
For more specific design and game content (unit introduction and implementation functions, etc.), please refer to the specific experimental report
doc/report.pdf
4 maps, 7 types of towers and 8 types of enemies
- In-game
ESC
returns to the main menu,F5
pauses The game balance is sloppy (the enemy too strong or the tower too strong)- There are some designs with strong personal style that are not very recommended
Qt >= 5.12
Ubuntu
apt update
apt install cmake make g++ qt5-default qtmultimedia5-dev
Windows
- mingw Qt5.12