Combat Game
Summer 2022
I aimed to embark on a more extensive project in Unity to explore the software's capabilities in greater depth. This involved delving into combat game logic, implementing interchangeable weapon sprites, creating animations and utilizing an event system. As part of this ongoing endeavour, I am actively involved in refining aspects such as dungeon generation, inventory management, particle and sound effects, and optimization techniques.
Key Features
- Combat System: The combat system involves sending events between the player and the enemy based on hits. This is controlled via a state machine that links to the animation to be played. Normal hits deal some damage, but if the poise is full, the poise ring is reset, and the damage is multiplied. The poise ring decreases over time and only increases with each hit. Dodging creates a small window where you cannot be hit. You can also parry, which, if timed just before a hit, will prevent damage and stun the enemy. However, if you hold the parry for too long, the hit will only be blocked without stunning the enemy.
- Animation System: I've developed an animation system that has undergone several iterations whilst learning Unity's built-in animation system. This includes creating transitions using animation variables and controlling additional features such as dodge periods and the end of animations using Unity's animation events. However, I have since discovered that controlling animations purely in code may be more complex to implement, but it offers much greater control, easier editing and decoupling of animations from an entity's state machine.
- Equipable Weapons: A particularly challenging aspect of the project was enabling equipable weapons with the same animations. To achieve this, I utilized Unity's animator to align the weapon's position to match the current animation frames. While this approach worked to some extent, it revealed the true complexity of the problem, especially when dealing with weapons of different lengths. This experience has given me a deeper appreciation for the workload on the art side of game development, as it's become clear that the solution often requires creating numerous animations for different scenarios.
Challenges, solutions and lessons learnt
Initially, this was intended to be a group project; however, all the other members ended up dropping out and contributed very little code. As a result, I made the decision to continue my progress and learn as much as I could by working with a game engine like Unity and applying general game development principles. As this was my first major Unity project, I encountered numerous challenges since I was still learning. For instance, I wasn't sure how to approach combat interactions and animations, as I had never used a state machine in this manner before. The project's implementation has undergone multiple iterations, and I believe it is still overly complex due to the learning process. However, if I were to start this project now, I could make it significantly less complex, cleaner, and more scalable.
Trello
![](../Assets/CombatTrello.png)