Documentation + User Guide


Comparison to the concept document

I think overall the game is very close the original design that I wanted to create. There could be more to the game I think but as is the entire skeleton is there and would just need to be refined.

the different difficulties are not included because I feel they would be harder to balance than they appear. there is also the problem of the game running slow the more enemies spawn so the harder difficulty might be unplayable for some people. It was also easier to test one difficulty and try to balance that rather than have to worry about three different difficulties to balance.

I had originally wanted to have more enemy types that would attack/hinder the player in different ways. Things like big mini bosses or enemies that attack at range were planned but ultimately I didn't include them during the development. The reason is that in order to make these different enemy types I would have to draw sprites that match the others stylistically. I am not good at drawing though and took me a long time to do just the basic player and enemy sprites. If I were to draw more enemy types I would have ended up having less time to actually make the game work. I decided that I should get the game to work as well as possible with less enemy types rather than potentially having a game that doesn't play as well. I think the current way the enemies work still provides a decent challenge as their pathfinding makes them cut the player off and surround them.

There was a mention of bombs and potions which weren't implemented either. I feel like these would have made the game too easy the potion makes it so the player is less likely to leave the arena to heal during waves and the bombs kill enemies with less precision than the current throwables lowering the skill ceiling.

The idea that the player has to willing end their run so enter a high score was not included yet. This was essentially meant to be a story element and since there is no story implemented it is not included. I feel like the game would have to be much more going on for this element to be included because it feels silly to me given that the game is a fairly bare bones wave survival game. If I were to add more mechanics and enemy types then I think it would be worth adding back in because the difficulty would increase in a more dynamic way rather than simply swarming the player. As is the simple enter a high score on death mechanic works for me and the player something to strive for.

Testing feedback

Feedback from the testing session was mostly positive which is good. Everyone said that the game was fun though they said that the controls were strange at first but they got used to them.

The first thing I adjusted was the wave progression. Generally people thought it was good but I think id did feel a bit too fast. This would also cause the performance issues which everyone ended up having. One of the issues brought up was that there was no indication that a wave started plus the player also started in the arena which didn't give them time to react. I placed the player in a safer spot to start with as well as added a countdown timer for each wave.

Half of the people who played the game didn't realize there was a shop which made there initial experience worse as leveling up is important. I ended up creating some text to place into the game to indicate this to the player.

One player had the tilemap glitch occasionally showing the background behind so I had to adjust the settings in the game to try and prevent this. I ended up using a sprite atlas to force padding in the tilemap sprites which seems to have fixed the issue.

It was suggested that some lighting effects be added as the game looked a little bland when it comes to the scenery. I ended up doing this which definitely made the game look better.

The biggest issue was performance which is difficult for me to deal with. It was hard to test this for myself as the computer I'm working on is fairly strong I could get to around wave 25 before any noticeable lag (apart from a few frame drops). I think the issue was coming from the way the enemies recalculate their paths to the player. They do it far too much at the moment so once there are lots of them they start to lag the game. I slowed down the wave progression to help this a bit but ultimately I would have to make a lot of changes to the path follow script so hat it runs efficiently. Even then eventually the player will hit a point where the game starts to lag. In the meantime I did fix up some other scripts that were using update() too much so that might help a bit.

User guide

User Documentation

Asset List

In order of their appearance in the unity project window.

Fonts
Prefabs
Enemies
  • There are five enemy prefabs which are spawned from the spawners in game. The spawner randomly select one of the five. The five enemies are almost identical. Each has a different colour, different health and damage progression, different movement speed and they all have different targets around the player.
  • EnemyBackstab - Blue. This one tries to move to a position at the player's back an attack them from there. It get more health and attack every 5 waves and is the 2nd slowest
  • EnemyChase - Red. This one charges the player and is the fastest. It gets health and damage increases every 7 waves
  • EnemyFlankLeft/EnemyFlankRight - Green. These two are almost identical except that they target different sides of the player. They gain a health and damage every 4 waves
  • EnemyFront - Yellow. Tries to move to the front of the player. Much slower than the others. Gets more health every 3 waves and damage every 5.
  • The different enemies are meant to surround the player and make it harder for them to escape plus make it so that they can;t stand still and win the game as they will get swarmed. They also use pathfinding to try and cut the player off so that they have to constantly be dodging/repositioning.
AxeHitbox
  • The axeHitbox is attached to all the enemies and acts as a way for them to hut the player. It is a prefab so that as I changed it's size it would update on each of the enemies. Each enemy uses the same sized hitbox so that it feels consistent.
HealthBar
  • Similar to the AxeHitbox it is attached to all of the enemies. As they all need to have similar looking health bars they all use the same prefab for it.
Thrown Weapons
  • There are three of these. The player can shoot using right click and they can choose to shoot either a dagger, axe or javelin. The three weapons all have slightly different properties so that the player has more options for dealing with enemies besides melee.
  • Dagger - Cheapest throwing weapon that breaks on impact. Meant for the player to either pick off an enemy or kill one that is out of range.
  • Axe - Can pierce around five targets. Helps the player deal with swarms without having to use melee and get into danger. Cheaper than javelins but more expensive than daggers.
  • Javelin - Pierces enemies until it hits a wall. The most expensive. Meant to be a way for a skilled player deal a lot of damage at once and maximize their score.
Player
  • The player character. Made up of their body and legs. The reason for this is so that they can swing the sword without sliding around unnaturally. It can be transferred across scenes without having to rebuild. In the current build this is so that it can be placed in the tutorial as well as the game. In future it could allow for different arena layouts/difficulties.
Scenes
Arena Profile - Main Camera Profile
  • Lighting effects for the game. Initially made for just the arena but used for all levels to give them a consistent style.
Arena
  • This is the scene that the main game takes place in. It is loaded from the menu and can load up the game over screen.
Game Over
  • When the player dies it goes to this scene and will either load up the high score entry screen if they did well enough or just display a message with their final score.
High Score Entry
  • Contains the objects that allow a player to enter their name for a high score. If the has gotten a high score it will be loaded along with game over.
High Score Display
  • Displays the currently stored high score if there is one otherwise it just displays a message.
Menu
  • The  main menu with it's navigation buttons. Player can start a game, do the tutorial or view the high score.
Tutorial
  • A quick level that explains the controls to the player as well as what the enemies are and do as well as the basic wave mechanics.

Scripts

AStar
  • Lindsay's node generation scripts. All of them have been mostly untouched by me.
PathFollower
  • Only script I made changes to. This is what gets the enemies to chase after the player. Initially they would head straight for the player but I changed it so that the different enemies will target areas around the player. They each have a slight offset with a random variance added so that the enemies don't overlap. Whenever the player leaves the arena or dies the script changes the target to be whatever spawner an enemy came from.
  • This is so that the enemies don't just stand outside the arena entrance waiting for the player making it hard for them to get back in. It also looks nicer for the enemies to leave the arena when the player dies.
Enemy Scripts
DummyEnemy
  • This is the script for the enemies in the tutorial. They don't move or fight so all they need is health so that the player can practice attacking them.
EnemyAttack
  • Contains two functions that turn the enemies axe hotbox on and off. These are called by animation events so that for 1 frame of the enemies animation the axe is considered active and deals damage.
EnemyControls
  • Handles the enemy's stats and collisions. The enemy types have different damage and health growth so this is setup here. Whenever a player interacts with a sword attack or a ranged attack the enemy takes the relevant damage.
  • It has interactions with the ScoreController and WaveController scripts. When an enemy dies in updates values in those scripts.
  • It also handles when the enemy knows it is in range of the player and can attack. It detects a radius around the player and plays the animation for attacking as long as it is within range of the player.
  • It is also responsible for playing the hit sound for enemies.
FollowEnemy
  • Script for the healthBar that is attached to enemies. Makes them hover above the enemy's heads instead of rotating with them making it easier to see.
MonsterSounds
  • Plays the grunting sounds for the monsters. Specifically it plays one of four random sounds then sets up a random interval 4-10 seconds longs and when that time is up plays another. Makes the monsters feel more alive
SpawnerControls
  • Controls for the spawners. Loads in the enemy prefabs and instantiates it at it's own position. The different spawners have different intervals for spawning which is used in a Coroutine. Each time an enemy is spawned it is passed information such as the where the player is, what wave we are on, where it's home position is etc.
Game Controllers
HighScoreCheck
  • Checks whether or not the play has achieved a high score. When they have the relevant prefs are altered. It also handles loading the message that shows the score the player achieved as well as whether or not it loads the high score entry scene.
HighScoreDisplay
  • Display the high score in a stylized message in the High Score Display screen. Shows a default message if there is no high score.
InputHighScore
  • Updates the stored high score value. When the player enters their name it stores it for display later.
PlayerController
  • Handles all of the player's stats. Has the functions for increasing stats as well as checking if the player dies.
ScoreController
  • Controls the score functions and performs the calculations using the player's score modifiers.
WaveController
  • Handles the wave progression. Everything that controls how a wave functions, when in stops and incrementing modifiers is controlled by these scripts.
Player Scripts
Attack
  • Handles the player's melee and ranged attacks. The scripts for turning the player's sword hit box on and off are here as well as the ammor count for ranged and the actual throwing weapon scripts
AxeControl
  • Functionality for the axe. Destroys it after five hits and makes it spin around
DaggerControl
  • Makes the dagger get destroyed when colliding enemies or walls
FollowPlayer
  • Makes the sword hit box and the player's threat radius (for enemies to detect the player) follow the player around. These two colliders can't be a part of the prefab because the will cause certain functions to trigger too much as there would be overlapping colliders
Footsteps
  • Plays the noise for the player's footsteps. Used as an animation event
JavelinControl
  • Makes the javelins break on contact with walls
LevelingControls
  • The controls for leveling up using the UI in game. Interacts with the score controller and the player controller.
PlayerInteract
  • Handles the players collision with the world. Determines if they are in the arena, at a shop or leveling station or getting hit by and enemy.
PlayerMovement
  • Mover for the player. Speed is gotten from the player controller
PlayerSounds
  • Outdated
ResetAttacking
  • Functions for player's attacking animation. Whenever the player swings their sword this script updates parameters in the animation to allow the player to either keep swinging or stop.
ShopControls
  • Allows the player to buy ammo at the shop UI
  • Misc Scripts
IgnoreSword
  • Prevents the arena bounds from interacting with the sword
MenuSigil
  • Sigil controls in the tutorial that goes back to the menu rather than starting a new wave
SceneSwitcher
  • Allows buttons in menus to switch scenes
SigilControls
  • Allows the player to strike the sigil in the arena to start the next 5 waves
StatDisplay
  • Allows the player to view their current stats with 'P'
TutorialDisplay
  • Displays tutorial messages

Sounds

Monster(1-4)
MonsterHit
PlayerHit(1-4)
Step
SwordSwing
Counter
Drone
EnemySpawn
MenuDrone
StartWaves

Sprites

Enemy

Two folders for the sprites and the animation controls

  • Enemy spritesheet which contains all there upper body movement. Grey coloured by default and recoloured  for the prefabs
  • Animation controller and animations for upper body and legs. Enemy uses similar legs to the player but with separate animation so that they don't share animation events
HitParticle
  • Hit particle for when the player/enemy gets hit
Player

Two folders for the sprites and the animation controls

  • All of the player's sprites for their upper body, legs and weapons
  • Animation controller for the player's upper body and legs including swinging sword, throwing weapon and walking
Tiles
  • GeneratedTiles - The tiles that make up the arena, sprite atlas to prevent gaps in tiles
  • TorchesAnimated - Animated tiles for the torches
  • The tile and torch spritesheet
  • The world tiles palette which includes the generated tiles and the torches
LevelUpText and shopText
  • Red text for showing which is the leveling up station and which is the shop
Sigil Sprites
  • Red sigil with on and off sprites

Other

2dRenderer
  • Renderer for lighting effects
HitEffect and hit particle
  • The prefab particle effect for hits and the sprite for the particles
UniversalRendererPipelineAsset
  • Render pipeline for lighting

Leave a comment

Log in with itch.io to leave a comment.