Crash is a local co-op fighting game based on Super Smash Bros. It implements many key features including hitstop, camera shake, unqiue abilities, haptic feedback and more. Using the Gameplay Ability System I was able to create many abilities and effects that are executed in a way so that the code is decoupled and maintainable. The project also contains a Character Creation Tool which is used to rapidly make new characters and abilties and then assign the abilities to the player input.
Programming and Design
2023
Fighting, Tools
Unreal Engine 5, GAS, Slate, Rider, Visual Studio
The abilties in Crash are designed to be versatile and enable quick creation of new and unique abilties. Each abilitiy inherates from 'UCrashGameplayAbility'. This abstract class contains the base functioality to set up each ability, this inlcudes options for trigging the ability, methods for activating animations to the owning character of the ability and creating effects in the ability to be applied to the owner or a target.
The structure of abilities was desingered to maximize the use of inheritance and data architecture. Therefore child classes contain more variables exposed to blueprint to allow desingers to change the behaviour of each ability. The image below is the header file for the UCrashGameplayAbility it demonstrates the base functionality conatained within each Crash ability.
The attack ability is where most of the functioality is contained, it holds variables and data which is exposed to blueprint. This allows desingers to tweak the ability so that the attack functions as intended. This class also has many helper functions to apply a variaty of effects to the instigator and target.
The image below showcases the header file of the Attack Ability illustrating some of the exposed data and helper functions that all attack abilties through the game will contain.
The camera in this project needed to show the action of the characters fighting but also make sure all players are always visable. Additionally the camera should only move within a fix area, even when the character is outside this area as this is concidered the death zone. During initalization, each player controller would register itself with the main camera Sub System, setting it as the players viewport camera. Due to this game being local multiplayer every player uses the same camera. Once the controller was registered with the Sub system a reference is kept to all registered Players.
The camera movement is calculated by getting the average location of the characters and then lerping from the previous location to the new average location, an offset is applied that can be changed in blueprint. The location is clamped between the min and max position which is also exposed as square outline in the scene, it can also be changed in Blueprint.
To calculate the zoom of the camera the max distance between the characters is found and the camera then lerps to that distance. The zoom is also clamped to a max distance which can be set in blueprint and tweaked with.
The Character Creation Tool was made for this project to streamline the process of creating characters and mapping the abilities to inputs. The tool is made using Unreal's UI framework Slate in C++. The layout of the tool is shown in the image below. The layout of the control map is desgined to reflect the input the player will press to activate the mapped ability.
The tool can create Crash Characters and Crash Gameplay Abilities within the content broweser using the buttons at the top of the tool. Any ability can then be mapped to the input of the character. Each character has a set of basic and special abilities, when an ability is mapped to the input by clicking on an input and choosing an ability from the dropdown it will be shown beneth the input.
Throughout the project I have used the tool to create abilities and remap them on the testing character to test the abilities. For the project I have made three different characters using the tool. These characters share a basic ability attack set and common movement abilities such as jumping and phasing through platforms. However, each character also has their own special abilities. The character creation tool was intended to make the task of creating new characters and mapping abilities to characters an easy and streamline process.
Before using the tool a character must be designed, the example below is a character called Ancient Queen. It demonstrates all of the special attacks and the inputs they are mapped to. The design also includes the mesh it should use and the character colour:
After the character has been designed, the tool can be used to implement the character. The video below is a demonstration showing how the characters for the Crash project have been implemented. The video shows the implementation of the designed character example above.
After the character has been added using the tool the video then shows how the character can then be selected from the character select menu and then controlled and used within the game with the correct abilities mapped to the character.