Turn Based Shooter Kit for Unreal Engine
Dialog Component
BP_DialogComponent handles the logic for dialogue interaction e.g. with a terminal. It specifies all possible texts to display and which one to show currently.
Face Player Component
BP_FacePlayerComponent handles the rotation of actors that should face the player e.g. enemies, objects, pickups. By using sprites, this component makes sure each actors is visible to the player.
Health Component
BP_HealthComponent handles taking damage, updates health and armor values and a dead state. It allows for damage modifications based on the actor StatsComponent. While it also supports health regeneration, this functionality might not be applicable for a turn-based game.
Stats Component
BP_StatsComponent is used to define the stats of an actor. These stats currently support modifying damage dealt and received amounts, but can easily be extended for other gameplay purposes.
Damage Interface
I_Damage defines an abstract way to modify outgoing and incoming damage.
Dialog Interface
I_Dialog defines an abstract way to show and clear dialog text.
HealthActor Interface
I_HealthActor defines an abstract way to let an actor know it died.
NamedActor Interface
I_NamedActor defines an abstract way to get the actor its name.
RemovableActor Interface
I_RemovableActor defines an abstract way to get the actor GUID and destroy it based on save data.
Base Enemy
BP_BaseEnemy is the generic enemy class. It serves as the base class for all enemy types and can be easily customized using the different components and their properties.
Adding a new enemy is as easy as creating a child actor of the BaseEnemy Blueprint.
Enemy Activation Component
BP_EnemyActivationComponent handles the activation state and activation radius for enemies.
Enemy Attack Component
BP_EnemyAttackComponent defines the enemy attack using stats like attack range, attacks per turn, damage and damage radius. It also handles the attack animation and attack sound when a flipbook and sound are provided.
Enemy Move Component
BP_EnemyMoveComponent defines the enemy moves using stats like move time and moves per turn. It first determines the best path to the player using the NavMesh and then checks all four directions of the enemy. It moves in the direction that matches the best with the NavMesh result.
Enemy Interface
I_Enemy defines the interface for the Enemy that is used by the save/load system and interaction between the BaseEnemy and its components.
Turn Based Shooter Game Instance
BP_TurnBasedShooterGameInstance is the game instance and handles log entries like ‘+1 Key’ or ‘Found Shotgun’ and save and load game logic.
It also manages the character archetype selection options.
Turn Based Shooter Game Mode
BP_TurnBasedShooterGameMode is the game mode and manages the turns system.
Main Menu Game Mode
BP_MainMenuGameMode is the game mode and specifies the BP_MainMenuPlayerController as default controller. It is used as the game mode in the Main Menu map.
Save Game
BP_GameSaveData, BP_LevelSaveData and any other SaveGame files act as containers for the save data (e.g. current level, health for the HealthComponent).
Log Interface
I_Log defines an abstract AddLogEntry function for the GameInstance so every actor can easily add a Log entry.
Turn System Interface
I_TurnSystem defines an abstract way to query and progress the current turn.
Base Item
BP_BaseItem is the parent class of all the item types. It handles the activation of the pickup when hitting the player.
Armor Item
BP_ArmorItem is an item that adds an armor pack to the player inventory.
Health Item
BP_HealthItem is an item that adds a certain amount of health to the player when not at full health. Else it will add an health pack to the player inventory.
Simple Item
BP_SimpleItem is a generic item that can be used for any inventory item (e.g. ammo).
Weapon Item
BP_WeaponItem is an item that unlocks a weapon for the player.
BaseObject
BP_BaseObject is the parent class of all objects. It handles the GetName function for vision (overridden by child Blueprints) and the default components.
Exit
BP_Exit is used to travel between levels. By default the PlayerStart position and rotation is used but it allows to override these values.
Sliding Door
BP_SlidingDoor is used to travel between rooms. It can require a certain item, for example, a key.
Terminal
BP_Terminal is used to instruct the player when interacted with. It uses the DialogComponent to define its sentences.
Barrel
BP_Barrel is an object that explodes when receiving a certain amount of damage.
Interactable Interface
I_InteractableObject defines an abstract way for the player to interact with an interactable object.
Player
BP_Player is the player of the game. It handles player input for movement, rotation, interaction and weapon selection. It also defines what should happen when leveling up.
Experience Component
BP_ExperienceComponent defines the current experience and level of the player. It uses a level curve to check how much experience is required per level.
Interaction Component
BP_InteractionComponent allows the player to interaction with InteractableObjects.
Inventory Component
BP_InventoryComponent is an container for the player items and weapons. Defines types, amounts and max amounts and ways to increment and decrement the amounts.
Item Component
BP_ItemComponent allows the player to use items via the Inventory option in the Pause Menu.
Vision Component
BP_VisionComponent defines the player’s current vision (what is in front of the player). It uses the GetName interface call to get the name of the actor without casting.
Player Interface
I_Player is an abstract way to communicate to the player for the ExperienceComponent and Weapon classes.
Main Menu Player Controller
BP_MainMenuPlayerController is responsible for creating and interacting with the Main Menu
Turn Based Shooter PlayerController
BP_TurnBasedShooterPlayerController is responsible for creating and interacting with the HUD (Pause Menu and HUD changes). It also handles dialog interaction logic and the game over visuals.
Player Controller Interface
I_PlayerController is an abstract interface between the game logic (e.g. pause and game over) and the player controller.
Base Weapon
BP_BaseWeapon is the parent class of each weapon. It handles the finding of a target and applying damage to it when the player request a burst.
The weapon defines multiple properties: burst size, weapon range, damage and damage radius, fire delays, accuracy and more.
Ammo Component
BP_AmmoComponent handles the ammo for the weapon. Defines the ammo per shot, ammo type and whether the weapon has unlimited ammo. The current ammo is checked when the player requests a fire.
All user interfaces support gamepad input. Whether to highlight the selected button can be toggled using the HighlightButtons variable.
HUD
BP_HUD is the in-game user interface and shows the current health, armor, ammo, turn, vision and log entries.
It also defines the game over screen with the load game option and option to return to the main menu.
The pause menu user interface is also integrated in the HUD and allows the player to continue the game, use items in the inventory, save and load the game or return to the main menu.
Main Menu
BP_MainMenu is the main menu user interface and allows the player to start the game, contains the settings like help text and character selection.
InventoryItemWidget
BP_InventoryItemWidget is a visual representation of an inventory item in the HUD pause menu. It shows the amount per item and a button that is enabled when it can be used.