Space Shooter 2D Kit

Space Shooter 2D Kit for Unreal Engine 4

Features

Versions

Documentation

FAQ

Credits


Share

Contact

Graces-Games-Logo

Graces Games

Documentation


AI Controllers

Suicide AI

Enemy AI that makes the enemy pawn fly towards the player location if it is above the player. Else the default movement is used. The goal of the AI is to collide with the player to deal the defined collision damage.

Characters

Base Character

BP_BaseCharacter is the parent class of the base enemy and player. It implements the changing of Flipbooks function and the health and health regen systems.
The health system handles taking damage, changes the maximum health and checking if the character is dead.
The health regen system, regenerates the character’s health after not taking damage for a while.

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 property structures.
Adding a new enemy is as easy as creating a new rule in the EnemyType data table and specifying its properties.

Player

BP_Player is the player of the game. It handles player input for movement, firing projectiles and activating nukes.
The player support movement using the built-in Unreal Engine physics of simple sweep movement.
It also allows for several skills using the different pickups like activating a shield and upgrading its weapon from single shot to double or even triple shot.
It has an ammo system for the normal weapon and nukes. The weapon ammo also has an unlimited option. The player has three fire modes:

The user can select different ships using the ship select menu in the main menu. These are defined in the PlayerShips DataTable.

Game

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 and Mobile Main Menu maps.

Space Shooter 2D Game Instance

BP_SpaceShooter2DGameInstance is the game instance and handles the ship selection options and currently selected ship. It is used by the game modes, the selection in the main menu and the correct spawning in the Test maps.

Space Shooter 2D Game Mode

BP_SpaceShooter2DGameMode is the game mode and handles the current score, score multiplier, and game over actions. It is used as the game mode in the Test maps.

Game State

BP_SpaceShooter2DGameState is the game state and handles the saving and loading of the save game.

Save Game

BP_SpaceShooter2DSaveGame is the save game and acts as a container for the save data (e.g. high score).

Pickups

Base Pickup

BP_BasePickup is the parent class of all the pickup types. It handles the activation of the pickup when hitting the player, after which is destroys itself.

Health Pickup

BP_HealthPickup is a pickup that return a set amount of health to the player.

Nuke Pickup

BP_NukePickup is a pickup that adds one nuke ammo to the player.

Score Multiplier Pickup

BP_ScoreMultiplierPickup is a pickup that activates a score multiplier for a limited amount.

Shield Pickup

BP_ShieldPickup is a pickup that activates the shield of the player.

Weapon Ammo Pickup

BP_WeaponAmmoPickup is a pickup that adds a set amount of weapon ammo to the player.

Weapon Upgrade Pickup

BP_WeaponUpgradePickup is a pickup that upgrades the weapon of the player.

PlayerControllers

BP_MainMenuPlayerController

Is responsible for creating and interacting with the Main Menu

BP_SpaceShooter2DPlayerController

Is responsible for creating and interacting with the HUD (Pause Menu and HUD changes).

The player controllers also hold the variables to:

Projectiles

Base Projectile

BP_BaseProjectile is the parent class of the enemy and player projectile. It handles the initialization of direction and speed and checks if the target is damageable.
It also contains the homing logic which can be set using a target.

Enemy Projectile

BP_EnemyProjectile is the projectile fired by enemies and only collides with the player. On collision is damages the player an amount specified by the public variable and destroys itself.

Player Projectile

BP_PlayerProjectile is the projectile fired by the player and only collides with the enemies. On collision is damages the enemy an amount specified by the public variable and destroys itself.

Spawners

Base Spawner

BP_BaseSpawner is the parent class of all spawner types. It can be enabled/disabled (on/off) and activated/deactivated (spawning/sleeping).
It contains methods for spawning an actor, spawning a specific enemy (type) and filter a list of enemies on type.

Max Enemies Spawner

BP_MaxEnemiesSpawner is a spawner that only spawns a specific type of enemy when the amount of this type of enemy in the level is below a threshold. For example, it only spawns a Meteor enemy when there are less than two Meteor enemies in the level.

Pickup Spawner

BP_PickupSpawner is the spawner for all pickups and uses a list of pickup spawnees. Each spawnee defines the type of pickup, its spawns per minute and the scale of the pickup.

Wave Spawner

BP_WaveSpawner is a spawner that spawns waves of enemies randomly chosen from the possible spawnees. It defines several customizable delays, for example delay between enemy spawns and delay between waves.

UI

All user interfaces support mobile and gamepad input.

HUD

The BP_HUD is the in-game user interface and shows the player the current health, ammo, score, score multiplier and amount of nuke ammo.
It also defines the game over screen with the high score, current score and option to return to menu.
The pause menu user interface is also integrated in the HUD and allows the player to continue the game, reset the high score and return to the main menu.
The BP_MobileHUD version is created for mobile support. It is more centered, has bigger button for touch input and shows the virtual joystick and buttons (fire, nuke and pause).
BP_BaseHUD is used to extract common logic of both BP_HUD and BP_MobileHUD.

Main Menu

BP_MainMenu is the main menu user interface and allows the player to start the game, change settings (e.g. resolutions), show the controls and quit the game.
The MobileMainMenu version is created for mobile support. It does not show the resolution options.