Turn-Based Battle System
For the battle system, I use a state machine to manage the distinct combat states of each character on the field. The system sorts characters by their speed stat, handling unique states for players and enemies to manage actions like attacking or using items. Each attack is tied to a Scriptable Object storing the type (melee or magic) and difficulty. This data spawns a corresponding drawing minigame where damage is determined by the player's accuracy, repeating the loop until one side is defeated.
Sword Attack Minigame
For the melee minigame, players trace a path across the screen by moving their mouse toward a target dot icon, which dynamically spawns a new target upon completion. The minigame concludes once a set number of dots are hit, the timer expires, or the player releases the mouse button. For visual polish, a dynamic trail renderer tracks the mouse movement to visually simulate a sword swing.
Cutscene Player
For the game's opening cutscene, I use Unity Timeline to sequence voice lines, splash art, and dialogue into one scene. I built a control system that pauses the timeline at the end of each shot, allowing players to click through at their own pace to see the art and narrative. Additionally, a skip function is integrated to let players skip the sequence and jump straight into gameplay.