Back

Mobile
Prototype

TRAILER

Project Details

Category
Mobile topdown Hack and Slash

Production Time
4 weeks

Responsibility
Product Owner

Team Size
1

Task
Combat Designer
Game Designer

Game Engine
Unreal

Supported Platforms
Windows
Mobile
WebGL

Description

Mobile Prototype is a prototype I made of a mobile hack and slash game were you play as a warrior and slay enemies while stealthing, with a bow or in close combat.

It is entirely designed and scripted by me.

At this moment there is no quest system implemented in this prototype, so your mission is just to run around and slay enemies. But that is something that i plan to do in the future.

*Animations and meshes are not created by me.

Character AnimBP

I wanted to optimise the controller and minimize the nodes on it to make it more efficient for the mobile device to select the correct stands while the player is moving. Below you see the Animation Blueprint were i divide the different strands of the player by a Enumerator "Controlled Character State". As this is runned from the parent character the AI and the character can share the animations and the Animation blueprint to make it even more efficient for the intended hardware.

The characters are controlled by a 2D blendspace that matched the input of the players movement for all 4 states.

Un-Armed

Stealth

Melee

Ranged

AI Design

The AI is designed that there can only be 2 attackers at the time, if there are already 2 AI attacking the AI start strafing around the player character. In this game I have implemented the AI to use different weapons, Sword and Shield and Ranged, and they use heavy attacks as well.

AI Behavior Tree

All AI share the same behaviour tree, as they have the ability to Roam around, Patrol around a spline, Guard a selected target point, get into Combat when they see the player, Search for the player when the lose sight of the player and be dead when they lose all Health points. While in combat mode the AI will check if the distance to the player get greater the a curtain amount and will start running towards the player, and when it reaches a certain distance it can choose, in its combat behaviour, to approach the player, strafe around the player to get a better position or if there are more the 2 AI's attacking at the same time, or Attack the player if its less the 2 AI's attacking.

BTS_VisionCheck

This Service is the brain of the AI character, were it checks if its in a certain distance to the player and if the player is in front of the AI character. Depending if it can see the player it goes to combat mode or if it was in combat and needs to search for the player, or if it does not see the player the it will continue its idle state were it can either Roam around, Patrol a spline or guard a target point. This is set on the character itself, and depending if it has valid patrol or guard points it selects the corresponding state. If it doesn't have any of those the AI will start roaming around.

BTT_SetWalkSpeedAndFocus

In this Task the designer can set the desired walkspeed and focus of the AI, it's going to roam around, it gets a speed of 150 and no focus on the player, but if it's running after the player it has a speed of 400, as well as if it's in combat with the player it has a speed of 150, and focus on the player so it can strafe around.

BTT_WanderToPoint_PARENT

This Task is a parent task were it gets a destination and a rotation from a child task and moves the AI to the destination. After reaching the destination it turns the AI it its desired rotation

BTT_Wander_Child

This Task is a Child of BTT_WanderToPoint_PARENT, where it sets a reachable destination in the navmesh and calls the parent to make the AI walk there.

BTT_GuardToPoint_Child

This Task is a Child of BTT_WanderToPoint_PARENT, were it gets a guard point set by the designer from the Blackboard and sets the location and rotation, then calls the parent to make the AI walk there and rotate when it reaches the end.

BTT_PatrolToPoint

In this Task the Designer will assign a patrol spline to the AI character and it will get it and get the length of it as patrol points. If it has reached the last patrol point it will reset its path and start moving to the first one, if not then it will continue to the next patrol point.

BTT_Strafe_Child

This Task is a Child of BTT_WanderToPoint_PARENT, were it will check if it's going to strafe right or left and set a destination to the right or left of the AI character. It checks if it hits something, and if it does, then it will set that as the new destination. After it sets the destination it will call the parent to make the AI walk there.

BTT_Attack

This Task will check for what combat state the player is and execute a attack if the Target is close to the character while in melee or stealth stands, or if its in ranged it will aim for 5 seconds and then take the shot.

BTD_DistanceCheck

This Decorator will run when AI is in combat and will determine if the AI is in a certain distance to the target. If it is then the AI will continue with the next task, and if it is not then the AI will start attacking. It has also the inverse function for it and will return if the AI is outside a certain distance to its target.

BTT_DestroyMemory

This Task will destroy the memory of the target from the AI, and will return to its default Idle state. It will check if it has a Guard point or a Patrol point and will return to its task, but if it does not then the AI will start Roaming.

BTT_RangeToTarget

This Task will check what Combat type (Ranged or Melee) of AI it is and will set its combat behavior according to the distance to its target, It checks as well if there are other AIs attacking the target and strafes around until it gets a opportunity to attack.

Level design

The level is designed to be a mix of a Linear Organisation and a Web Organisation as to change the game pacing and difficulty for the player, the further along the player progresses. I wanted also to give players a feeling of choice as were they could go on the map, as well as what quest they would like to do. As I have not implemented a quest system on this prototype yet, I still gave the choice to the player to choose where they would like to go to and give the system the opportunity for further development.

Image 1

When the player enters the Entrance area from the Forest the level organisation is more Linear to guide the player forward on them map
In the Entrance area there are some enemies guarding and one patrolling enemy, the white line by the fontain is the patrol path
Further on from the Bridge area to the Town area the level organisation is Linear, but in the Town area I wanted to give the players more choices to were they could go, so the level changes to a Web organisation
As this is the starting area I wanted the level not to be so challenging for the player as to attract more new players. There are 2 guards guarding each entrance
When entering the castle area the player has more choices to go as the level organisation is a Web organisation. The player also has the choice to move on 3 different planes - Ground level, Castle walls and on Towers for planned boss fights. I wanted to lead the players forward so what way the player chooses to walk they always can return to a HUB if they follow the path, and this way players does not need to back track
As this is the castle area it's heavily guarded with both guarding enemies, roaming enemies and patrolling enemies. the white lines are the patrol paths that the Patrolling AI will follow

Torch Material

As I wanted to optimise the performance of the game to fit a mobile device I made so that all static lights are made from emissive materials that affects the world. In this way I could save up on lights placed in the level and use materials to light up the level that runs on the GPU. I wanted also to minimise the use in particles on the world to give a bigger budget to the players character, so this torch is made of a plane with a flipbook material

© Copyright 2023 All Rights are Reserved.