Hocus Focus
Unity Engine
Personal Project 2022-2023
Hocus Focus is a personal project I started working on in 2022 and finished a demo for it by early 2023. It is a turn-based tactics game, in the vein of XCOM (with a cover system), that has a "focus" mechanic which affects the hit chance of all units. I was responsible for the full design of the project and coded the cover system from scratch. For unit models, SFX, music, fonts, and animations I used third party resources. This was my first 3d project in Unity, my first time doing a blockout, and first implementation of A* pathfinding for the movement system.
Design Goals
Grid-based movement and combat
Turn based gameplay using an action point system
Cover system to enhance tactical decisions
Focus mechanic that felt thematic and impactful to gameplay
Cover system
During an attack units would have their chance to hit targets with cover reduced.
The cover script was on a prefab object so that the environmental models were independent of the cover system.
Once a blockout was complete – it was quick and easy to setup an arena or chokepoint by adding cover prefabs.
Adjusting the enviornment was efficient since the cover prefab could be easily added or removed
Upon a unit triggering the cover system, the prefab would display the cover icon on the object and also the unit's combat UI.
Using C# events I was able to keep the cover script decoupled and generic enough for all units in a level to trigger the system. An exit event aslo cleaned up the object UI and the unit leaving cover.
Focus system and balancing combat
The goal of the focus system was to provide a thematic answer to why a unit misses a 99% chance to hit attack.
This game is about wizards battling and casting spells requires a lot of focus! It's quite expected that a spell is interrupted when a wizard is getting bashed with an axe.
Each round all units will lose 1 focus and upon receiving damage they will lose a substantial amount.
Focus is calculated in all combat rolls, so the lower the focus a unit had, the worse they were at fighting.
Keeping track of the health and focus of units became crucial to gameplay decisions. It also opened up interesting combat and system design opportunities.
I designed class archetypes based around combat, support, and focus specialties. Units are balanced around their role - for example, a wizard that does powerful focus damage, will damage the enemy's hit points less.
Some units were designed to be excellent at regaining focus for themselves or teammates, while others were quite bad at regaining focus.
A diversity of roles in the player party and enemy units encourages interestingchallenges and tactical decisions.
Post-project evaluation
What went well?
I learned a lot about Unity's URP and developing a 3d project from scratch.
The experience gained doing a blockout will help all of my future projects.
First experience applying animations to models will bolster the polish of projects.
Cover system worked on multiple levels (UI, stats, and combat).
My first time implementing A* pathfinding was overall succesful.
Sufficient playtesting made it clear what bugs needed attention to improve the gameplay and the project's ability to scale.
What went wrong?
The enemyAI for movement had potential for a bug that would overlap them with other units. This was something rare in the scope of the demo, but was a clearly a problem for scalability.
The focus UI was a bit hard to see in comparison to the HP bar.
Unit selection had to be done by clicking on the grid the unit occupies. Playtesting showed that players were inclined to click on the unit instead. This made the game feel unresponsive despite it functioning correctly.
The combat camera would not account for buildings, so there were often bad zoom-in shots around denser sections.
What would scaling up this project look like?
This was a project I really enjoyed working on and I learned a tremendous amount. It also bolstered my confidence that I could be making games from scratch more often.
At the time I finished the demo, I found that the scale of the game was quite hindered by my inexperience with grid-based game architecture. So I've spent time studying articles and tutorials on how to resolve its unique challenges.
I would like to push it further with a stronger understanding of A* pathfinding and grid-design better.