Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.
/ TowerDefense Public archive

An academic project that consists in making a tower defense rendered using ImGui only

Notifications You must be signed in to change notification settings

BloodLantern/TowerDefense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fourmi Defense

A game about ants attacking a non-existent exit

thumbnail


Summary


How to play

Project dependencies

This project depends on many libraries like OpenGL and ImGui which are already included in the repository.
However, libraries like Asio (asio-1.24.0) and the networking framework aren't included so you need to set up these by yourself. To do so, the project hierarchy must be as follows:

Folder
└───TowerDefense
|       TowerDefense.sln
└───asio
└───sudonetwork

The folder names are case sensitive.

The TowerDefense folder can be obtained by cloning the repository.

Launching the game

The only thing left is to open the solution file (TowerDefense.sln) in Visual Studio 2022. Compile it using the big green play button on top of the window, and you're done!

Multiplayer

Multiplayer is supported but not as much playtested as the rest of the game so beware of bugs that might happen.

Multiplayer is limited to 2 players.

To play in multiplayer, one instance of the game must start a server through the window menu bar: Network > Start server. This instance will be the host. Another instance, called a client, has to join that server by first going into the options menu and typing in the server hostname. In a local network, this should be the host's computer's name or its IP adress. To play with a remote computer, the host has to redirect port 60000 to its computer and the client needs to use the former's public IP adress instead. After this step, the client has to connect to the server through the window menu bar: Network > Connect to server. If everything was done fine, if the host starts a game it should start for the client too. The client can then disconnect at any time using the window menu bar: Network > Disconnect.
To check if the connection succeeded, the client and the host can open the chat by using the window menu bar: Network > Open chat. Any message sent to the chat should be visible to the other players.
Currently, if any instance of the game tries to connect to a server more than once, the game will crash. It is a known bug that should be fixed in future versions.

The current synchronization includes:

  • Game start
  • Tower placing
  • Tower selling
  • Tower upgrading
  • Fast forward
  • Spray shoots (RNG)

Back to summary

Gameplay

Towers

Towers have 4 generic stats that can be modified through different upgrades. These are damage, attack speed, range and pierce. While the damage and pierce are linked to the projectile and therefore hidden to the player, the attack speed and range can be seen and upgraded at any time in the tower panel by clicking on the tower.
The tower panel is composed of the tower's name, its texture, upgrades, and stats like the number of enemies it killed, the damage it dealt ang the money it generated. As said before, the player can also see the precise amount of attack speed and range. These two stats can be upgraded up to 5 times using the button in front of them.
On top of that, every tower has unique upgrades that greatly affect the stats and in general the power of the tower. These are described in the tower upgrades section.

Tower list

  1. Minigun

BeehiveIcon

  • Fires at tremendous speeds.
  • Deals low damage but is very cheap.
  • Perfect for the early and mid-game.
  1. Cannon

BeehiveIcon

  • Low attack speed but AOE (Area Of Effect) damage.
  • Very useful for grouped enemies.
  • High damage with later upgrades.
  1. Beenest

BeehiveIcon

  • Medium attack speed.
  • Spawns bees to attack ants.
  • The bees choose a target and then hit it until it dies or goes out of range.
  • Can slow enemies with later upgrades.
  1. Ant spray

BeehiveIcon

  • Deals low damage but has a very high pierce and AOE damage.
  • Later upgrades help not to miss the target when shooting.
  • Can slow enemies with later upgrades.
  1. Beehive

BeehiveIcon

  • Doesn't attack enemies. Its only use is support and utility.
  • Generates money each round.
  • Can generate live as well with later upgrades.
  • Can buff Beenests with later upgrades.

Tower upgrades

As said before, towers have custom upgrades that can either change their stats or their way of attacking/working. These upgrades are described below, as well as the base and maximum (including the generic and custom upgrades) stats of each tower.

  1. Minigun

    • Cost: $100
    • Base stats:
      • Damage: 2
      • Attack speed: 8.0
      • Range: 4.0
      • Pierce: 0
    • Maximum stats:
      • Damage: 3
      • Attack speed: 24.75
      • Range: 6.5
      • Pierce: 0
    • Custom upgrades:
      • Longer cannon: gains 1.0 range.
      • Stronger bullets: gains 1 damage.
      • Ludicrous firing rate: gains 3x base attack speed for a total of 24.0.
  2. Cannon

    • Cost: $350
    • Base stats:
      • Damage: 5
      • Attack speed: 0.4
      • Range: 5.5
      • Pierce: 40
    • Maximum stats:
      • Damage: In theory 10 + 7 * 8 + 5 * 64 = 386
      • Attack speed: 0.85
      • Range: 6.5
      • Pierce: 500
    • Custom upgrades:
      • Faster bombs: bomb projectile speed is increased to 30 (base: 15)
      • Damage increase: increases the damage to 7
      • Cluster bombs: shoots cluster bombs instead of normal ones. The cluster bombs explode in 8 normal bombs on top of dealing its damage. Because this upgrade is too powerful, the tower also looses 0.1 attack speed.
      • Recursive cluster: cluster bombs now also release 8 more cluster bombs. Because this upgrade is completely overpowered, the tower also looses 0.2 attack speed.
  3. Beenest

    • Cost: $500
    • Base stats:
      • Damage: 8
      • Attack speed: 0.33 for bee generation and around 1.0 for bee attacks
      • Range: 7.0
      • Pierce: 0
    • Maximum stats:
      • Damage: 11
      • Attack speed: 1.08 for bee generation and around 1.0 for bee attacks
      • Range: 8.0
      • Pierce: 0
    • Custom upgrades:
      • More bees: increases the amount of bees the hive can spawn up to 8. (base: 5)
      • Darts: bees will now shoot darts at their enemies. The darts deal 1 damage and have 5 pierce.
      • Sticky honey: enemies attacked by the bees will be 2 times slower.
      • Angry bees: gains 1 damage.
  4. Ant spray

    • Cost: $400
    • Base stats:
      • Damage: 5
      • Attack speed: 0.5
      • Range: 6.0
      • Pierce: 500 -Maximum stats:
      • Damage: 5
      • Attack speed: 1.25
      • Range: 7.0
      • Pierce: 500
    • Custom upgrades:
      • Faster spray: increases projectile speed.
      • Intoxicating spray: adds a slow down to hit enemies.
      • Bigger spray: increases the spray hitbox.
      • More sprays: shoots 3 sprays instead of 1.
  5. Beehive

    As said before, the beehive is used to generate money or to buff Beenests and therefore doesn't have any damage or pierce. Its attack speed is the speed at which it generates money.

    • Cost: $800
    • Base stats:
      • Attack speed: 2.0
      • Range: 8.0
      • Money generation: 25
    • Maximum stats:
      • Attack speed: 2.75
      • Range: 9.0
      • Money generation: 50
    • Custom upgrades:
      • Faster production: gains 0.5 attack speed.
      • High quality honey: increases money generation to 50.
      • Healthy honey: gains a 10% chance to heal a random amount of lives in range 1-3 on each money generation.
      • Friendly bees: increases in-range Beenests' bees damage by 1.

Keep in mind that most of the above information can be seen in the tower panel either directly or by hovering over a text, image of value.

Enemies

All the information about enemies can be found in the bestiary accessible from the main menu.

Glossary

Damage:

BeehiveIcon

Damage is the amount of damage a projectile or tower will deal to its target.  
Even though you can't see this icon in game, it was originally an upgradable stat like the attack speed and range.

Attack speed:

BeehiveIcon

Attack speed is the rate at which a tower shoots. It represents a number of attacks per seconds.

Range:

BeehiveIcon

Range is the distance at which a tower can attack. It represents a circular range in tiles.

Pierce:

Pierce is the number of enemies a projectile can hit and go through before it dies.  
It doesn't have an icon because it is a completely hidden stat of the projectiles. The player can only guess its value.

Back to summary

About

An academic project that consists in making a tower defense rendered using ImGui only

Resources

Stars

Watchers

Forks

Languages