Tower Defense Starter Kit

**The Tower Defense Starter Kit is a pure blueprint framework that enables quick & easy creation of Tower Defense games.

Marketplace Page: https://www.unrealengine.com/marketp…se-starter-kit**

Features:

• Multiple types of AI Wave Spawning systems, with support for both Endless waves & repeating wave cycles with dynamically escalating difficulties.
• Towers: Machine Gun, Shockwave, Laser, Sniper, Artillery, Boost, & Mining Tower.
• Enemy AI: Tank, Healer, Rusher, Ranged, & Tower Disabler.
• Tower Abilities: Overdrive & Repair.
• Global Abilities: Airstrike, Tower Guardians, Proximity Mines, & Regen Field.
• Branching Upgrade Paths for Towers.
• Special Waves that spawn Bosses at the end
• Automated resource allocation between waves provide players with the ability to Build, Upgrade, & Sell towers.
• Main menu with level selection & persistent map unlocks across multiple sessions
• Modular Grid Generators with drag & drop support to create grid cells for tower placement.
• Loadout menu enables players to select towers & global abilities at mission start
• Supports spline based multi-lane paths & nav mesh based pathfinding.

**Technical Details: **

• Modular components are employed throughout the toolkit to handle special functionalities & aid in the creation of new variations to existing entities with minimal coupling.
• The Wave Manager allows complete customization of waves through parameters including Enemy Type, Number Of Units, Spawn Point, Spawn Delay, etc.
• AI Spawn Points support precached & runtime generation of randomized spawning locations.
• All default Tower attributes are stored in a centralized Tower Data Array & thus enables easy customization of said properties for all towers from a single location.
• All information pertaining to the towers & abilities are displayed dynamically using a data-driven approach, thus eliminating the need for manual HUD modifications when adding/removing towers.

Supported Platforms: Windows

Optimized for: Unreal Engine v5.2 [Features added in newer versions of Unreal Engine may not be available in the older versions. Check out ‘Updates change log’ in the following post to see the features that are available in different versions.]

Current Version: 2.28

Preview Screenshots:

](filedata/fetch?id=1379719&d=1507906885)

](filedata/fetch?id=1175437&d=1507906885)

](filedata/fetch?id=1636398&d=1561705127)

](filedata/fetch?id=1636399&d=1561705182)

](filedata/fetch?id=1636400&d=1561705210)

Preview Video:

If you have any queries or feature requests regarding the toolkit, you can always reach out to me personally through the Support Email.

2 Likes

Additional Resources:

Concept Overviews:

  1. Weighted Wave Spawn Controller: https://unrealpossibilities.blogspot…-basics_2.html (shared resource with FPS Tower Defense Toolkit)

  2. Enemy AI Classes: https://forums.unrealengine.com/show…l=1#post485985

Tutorials:

  1. How to set up waves using Batched Wave Spawn Controller: https://www.youtube.com/watch?v=-YwbcOaZZH8

  2. How to create new Towers: Tower Defense Starter Kit Tutorial: How to create new Towers

  3. How to create new Global Abilities: https://www.youtube.com/watch?v=eEHjTlchAJ0

  4. How to set up Global Ability Deployment: Tower Defense Starter Kit Tutorial: How to set up Global Ability Deployment

  5. How to create a new level: Tower Defense Starter Kit Tutorial: How to create a new level

  6. How to change the Grid size: https://forums.unrealengine.com/show…l=1#post486034

  7. How to add new levels to the Level Selection Menu: https://forums.unrealengine.com/show…l=1#post627662

  8. How to create new Enemy Types: https://www.youtube.com/watch?v=4jjl011xoiE

  9. How to set new UI Thumbnails for Tower Functions: https://www.youtube.com/watch?v=n_myHNws1Kc

  10. How to create your own custom Hero unit: Introducing Hero units to Tower Defense Starter Kit

  11. How to assign Hotkeys to Global Abilities: Tower Defense Starter Kit: How to assign Hotkeys to Global Abilities

Update Logs:

FAQ:

Q: I’m trying to create a new level from scratch within the toolkit & have made placed all the necessary actors in the level by looking at the sample maps. However, I’m unable to get the Global Abilities working in my level. Is there any additional procedure that needs to be implemented in order to get them working on a new map?
A: Yes, just make sure that steps mentioned in the following link are implemented: https://forums.unrealengine.com/show…l=1#post689302

Q: I’m using the spline-based pathing system provided in the toolkit for my tower defense game. I noticed that the units only traverse along the XY plane. Is there any way to make them travel in the Z direction (for example, going over hills) as well? I’ve already tried raising up the spline paths, but that did not create the intended result.
A: The spline-based pathing system, by default, enables movement only in the XY plane. However, you can make it move in the up/down direction by making a couple of small changes within the ‘Move Along the Spline’ function of BP_EnemyAI_Parent’ blueprint as explained in the following posts:

The price is $29.99 not $24.99…

Hey frostyshield, could you just double check on that. I’m seeing $24.99 at my end.

Tower Defense Starter Kit Basics: Enemy AI

The Tower Defense Starter Kit has 4 different types of enemy AI bots: Healer, Ranged, Runner & Tank. They’re all derived from the parent class ‘BP_EnemyAI_Parent’, which houses the core logic for all types of enemy bots. These include:

  • Moving toward the Exit Point [both navmesh & spline path based].
  • Event driven HUD stats updates [if the mouse cursor is centered on the actor]
  • Handling damage receive events & 3D Health bar updates.
  • Turning to face a target.
  • Set threat rating & health based on the active wave cycle.
  • Update calls to wave manager when the bot is destroyed.

All creeps can do damage against the player upon reaching the Exit Point actor, irrespective of whether they can target the towers or not.

1. Healer: The Healer bot is a slow moving support unit that uses it’s AoE Heal ability to heal all creeps in range. It does not posses any offensive capabilities & hence cannot target the towers.

2. Ranged: The Ranged bot is a slow moving offensive unit that uses ranged attacks against towers in it’s range. It uses a combination of distance, angular & line trace checks to identify targets along it’s path at regular intervals.

3. Runner: The Runner bot is a fast moving unit with low health that uses it’s high speed to bypass towers, especially when spawned in large numbers. It does not posses any offensive capabilities & hence cannot target the towers.

4. Tank: The Tank bot is an extremely slow moving unit with a large pool of hit points that can withstand lots of damage. It does not posses any offensive capabilities & hence cannot target the towers.

Great looking toolkit! I’ve been waiting for something like this since UE4 launched. I’ll likely purchase this in the next few days. Are you planning on making this toolkit mobile friendly?

I also have some requests for tower types:

Cannon/Catapult - A tower that flings projectiles in an arc to the target with splash damage
Resource tower - A tower that provides a flow of resources when you build it.

Hey tanka2d, thanks & good to see you again. :slight_smile: I’m planning to use the first few updates to add more features that are commonly found in tower defense games. For example, the first update will focus on a tower selection menu & new towers. Later on, I’d like to add a perks menu & new creep types as well.

I would definitely like to try out mobile support in the future, but I have not worked on mobile UE4 projects till now. As a result, it’s not part of the planned updates yet, but maybe a few updates down the line, I will experiment with it & confirm that.

As for the towers, thanks for the suggestions. The Resource tower will be added in the first update & I will try to include a catapult tower as well.

If you have more ideas, keep em coming. I want to use this toolkit to try out ideas that don’t fit well with the FPS Tower Defense Toolkit.

Tower Defense Starter Kit Tips #1: How to change the Grid size

The default dimensions of an individual grid cell in Tower Defense Starter Kit is 400 units [both in x & y directions in the local space of the parent grid generator]. However this can be easily altered based on the requirements of the user.

The Grid Manager actor has a user defined float variable termed ‘Grid Size’ exactly for this purpose. The ‘Grid Size’ variable can be modified to change the grid cell dimensions of all grid generators present in the level, thus saving the trouble of going to each & every grid generator to change it’s properties. In order for the change to be registered across all the grid generators, open up the ‘BP_GridGenerator’ blueprint & recompile it. Doing so will run it’s construction script once again with the updated attributes which will be reflected in all the grid generator actors in the level.

[Please note that the towers would still retain their original dimensions as the default tower meshes are clearly only intended to be prototypes. To change their dimensions, you could just go to the tower meshes in the ‘Meshes’ folder and then open up the towers and change their build size according to the requirements.

]

Just took that now :stuck_out_tongue:

Also would this be a good system for a MOBA?, How would one go about making a “minion” so to speak with the values of a tower? so its like a movable tower?

I ended up buying this last night and I am very much enjoying it, it’s very easy to customize (and I’m no programmer).

Quick question though, is there an easy way to add boundaries for your camera movement? At the moment it seems to scroll on indefinitely. When I’ve done this in the past I’ve used invisible collision boxes as boundaries, but your setup is a little different. It looks like there might be some boundary variables in the player pawn blueprint? They don’t seem to do anything though.

Epic had actually mentioned that it would be $29.99 after VAT. I’m guessing that it’s specific to certain countries, but thanks for bringing that to my notice. I have updated that information in the pricing details.

I don’t think it would be the best fit if you want to create a MOBA because then you would have to implement all the multiplayer aspects yourself. Since this toolkit is not designed with multiplayer support, it would mean that you would have to change some workflow to support replication. However I would suggest looking at this forum thread: https://forums.unrealengine.com/showthread.php?98267-MOBA-Template-for-Marketplace. From what I’ve seen so far, it looks like something that I would buy if I want to learn how a MOBA works.

As for your second question, the towers aren’t movable. You can however spawn them at any of the grid cells displayed in the map. Once spawned, you can choose to upgrade them or sell them. The minions on the other hand, spawn at the red markers & move toward the blue marker. You can check out this image from the first post to get a better idea: 20bbfed360b74144401ea025356af8f860709002.jpeg&d=1456946470. So basically the towers keep attacking any minions that get in it’s range.

Glad to hear that you’re enjoying it tanka2d. :slight_smile:

I apologize for not adding a boundary for the camera movement. I will definitely add both collision based & math limit based boundaries in the first update. The boundary settings that you might have seen are for getting the edge scrolling parameters. They will auto adjust based on any resolution changes to the game.

But in the meantime, you can add it to your level by adding a collision component within your player pawn. Then create a new object channel like saw ‘PlayerPawn’ & set this collision component to that type. Now add collision boxes outside the boundaries & set it’s collision settings to block the ‘PlayerPawn’ objects.

I’m having trouble doing this, I’ve done similar things before but for some reason the playerpawn continually goes over the boundary.

Any ETA on the first update? :slight_smile:

I’ll check it out & post the bounding box solution in a couple of hours. As for the update, if all goes well, I hope to submit it sometime before Friday next week. Hopefully, Unreal Engine v4.11 would be released before that so that I can test it out on the new version.

Alright, figured it out. First of all, I would like to ask you to make sure that you have ticked on the ‘Sweep’ parameter for ‘Add Local Offset’ in the Player Pawn. It’s one of the things that I forgot when I first worked on bounding boxes for RTS Cameras.

Next we would have to create a new Object channel for our blocking volume from Project Settings >> Collision >> New Object Channel. I’m going to name it BlockingVolume & set it’s default response to ‘Block’.

Now we can add blocking volumes on the 4 different sides of the map, just a bit outside all the floor meshes. Now from the details panel, change their collision properties to:
Generate Overlap Events = False;
Collision Presets = Custom;
ObjectType = Blocking Volume;
Can Ever Affect Navigation = False;

Next we’re going to replace the root component of the player pawn from the default scene to a box collision component. I’m just going to name it Root Collision & change it’s properties to:
Enable Gravity = False;
Generate Overlap Events = False;
Collision Presets =Custom;
Collision Enabled =Physics Only;
Object Type = Pawn;
Can Ever Affect Navigation = False;

As for it’s collision responses, we can set BlockingVolume to Block & everything else to ignore.

Now if you try going outside the boundaries, you player pawn should be blocked by the blocking volume. Let me know if you have any doubts about that.

Thanks! That worked a treat!

I think the only step I was missing was the sweep.

Hi, great toolkit! It would be nice to see something like mission select system with progress save in future updates. What you think?

Good to know. :slight_smile: I wasted a lot of time when I first ran into that issue as well.

Thanks for your feedback doc.f. :slight_smile: Yes that could be added in the future updates. Probably not in the first update, because having mission select screen would require a main menu screen of some sort, as well as all the menu transition logic, which would considerably delay the update. But yea, it will be added in the second update.

I’ve been working on the first update for the Tower Defense Starter Kit for a while now. Apart from new features like the Tower Selection Menu, this update is mainly intended to improve the existing code based on what I’ve learned since the toolkit was submitted to the Marketplace team in January. A major part of this endeavor has been focused on improving the code modularity & general code standardization/optimizations in an attempt to make it easier to expand upon the base toolkit.

Among the new features, the Tower Selection Menu at level start [optional] enables players to select from a list of towers specified by the designer. The menu system is almost completely dynamic & is created at runtime based on what the designer specifies in the new Tower Data Array for each level.

Alongside the Tower Selection Menu, changes have been made to the in-game HUD system as well. The default version of the toolkit employs two hand made 3D widgets to handle the tower build/function UI systems. The new update will make this system entirely dynamic. Based on the towers selected by the player & the list of tower functions, the in-game HUD will be automatically created, right down to the position & function of the buttons, thus freeing designers from making unnecessary redundant changes to the HUD systems for every new tower or ability that are added on top of the existing available options. I’m currently working on optimizing this part of the update. Once that’s done, the one remaining feature is to add a new mining/resource tower. Further additions if any, will depend on when Unreal Engine v4.11 gets released.

Since this update will bring about a lot of changes to the existing system, I’m planning to release it for v4.11 only. This would ensure that anyone who wants to use features from the base version, like say the static 3D widgets, can get the v4.10 project files.