Indie Journal: Week 2

So, I had my decided game idea - a top-down Hack-n-slash game. The first thing I went to develop was the basic movement of the character. I knew that I wanted the game to be controlled through WASD, and the mouse being the primary method of aiming the character.  I created a simple ball character and changed the settings of the Character Movement Component to feel quick and snappy. This was very similar to my character in my Year 0 project, which also had quick and snappy movement. However, the main difference of this game is perspective.

The camera was positioned high above the player character. so high that with a normal field of view the player wouldn't be able to see their character. To compensate, I turned down the FOV of the camera to have an acceptable view for the player. This is the same technique I used for my Year 0 project, where the game 'almost' looks 2D, especially when standing still, but upon moving the player would discover it's a 3D world.


I then began to work on the basic attacks of my character, making a basic 3 hit combo. I created a simple temporary sword model that I wanted to animate for the first two attacks. However, while testing this combo out and getting the feel of it, I realised that the easiest way to use the combo was to spam click the attack button. However, due to how the system worked, the player would not click in time with the attacks. Therefore, I would need to create a buffer system.

I did this through using a simple bool that stayed active for a short time after clicking. It then used this bool to decide if to attack instead of using the mouse input alone.



A visualisation of this can be seen below - as you can see, the player would (usually) attack out of time without buffering, due to the short time between each attack. If the player clicked extremely quickly, they would not be clicking on the exact frame that the attack would be available. Therefore, their timing would always be off. When buffering the clicks, I'm able to make the character attack as soon as the attack is available. While this means the player will not attack exactly on a click, the general combo is quick enough for the player's to not notice.



With this system in mind, I also implemented a charge attack. To achieve this, I made first made the attack activate when the mouse click is released instead of initially pressed. This allows me to record how long the player has been clicking for and use that to determine a charge attack. Along with that, it also allows me to 'scale' the charge attack by using a timeline that is activated upon pressing the mouse and using said timeline to scale a value which is used to determine the charge attack's length. Basically, the longer you hold your mouse, the longer you will do the charge attack for. To compensate for this, I also slowed the player down while charging, leaving them relatively vulnerable to enemy attacks.

Comments

Popular posts from this blog

Indie Journal: Critical Evaluation

Indie Journal: Week 6

3D Journal: Critical Evaluation