Project Type Solo
Duration 8 months
Focus Programming / Design
Software UE4
Ritual: Tactics is a turn-based strategy game set in a dark fantasy world. It uses a square-grid system for navigation. The game was developed by myself over the last academic year of my university course, and hence is the longest/largest project I've undertaken.
I designed and programmed everything, though I also used some asset packs for SFX, music, icons, and meshes.
A system that changes the resulting action based on what the cursor is hovering over at any given point. Along with some other external variables.
The movement, checking, and interactions constrained to the grid system.
The dynamic handling and managing of turns.
Interactions between characters and various scene actors, as well as the inner workings of player characters.
The contextual mouse system handles almost all player input and direct player interactions. It is likely the most complex system in the game.
Essentially, the action that the left-click will do will change depending on what is under the cursor. The demo video shows the system in action.
This is all implemented within the player controller blueprint. The system is quite expansive making it unpractical to showcase it in it's entirety here. Instead I'll provide a top-level overview, and pull out some interesting bits.
This system is run in real time - it's run from Event Tick. Every frame it will:
Do a mouse trace ("Get Hit Result Under Cursor for Objects" in blueprint), interpret the result and set an enum based on what it found i.e.: "empty", "interactable", "enemy".
It will then switch on the enum, redirecting the logic path to do the relevant action based on that initial mouse trace.
The action itself will be locked behind a gate, which only opens (and thereby executes the action) when the left-mouse is pressed down. The gate is then closed before the next frame, so each action only executes once per mouse click.
The execution and storing of relevant info from the mouse trace (step 1):
The interpreting of the mouse trace (step 1):
The switch based on the interpreted result of the mouse trace (step 2):
A contextual action locked behind a gate that is opened only when the left-mouse button is pressed. In this case, it's the contextual action for moving the character (i.e.: when the mouse trace finds an empty slot on the game grid)
The turn system handles turns order. It can dynamically adjust and reshuffle itself to accommodate for changes in active "combatants", i.e.: when an enemy or player character is added or removed from active combat.
The video demonstrates this.
This system is implemented in the gamemode, and occasionally referenced in each character blueprint. It is quite expansive, so I'll just showcase the main logic chain. This is the main part responsible for switching the turn from the current character to the next. It is quite top-level.
First it checks to make sure the game is still running, before sending a message to the current actor telling it its turn has ended.
Then the turn is iterated. To do this, first the current character is removed from the front of the "current order" queue, shifting the other elements down. Then new actors are added at the end of the "current order" queue from the "new turn order" queue (this is where turn order can be manipulated/shuffled without it being visible to the player).
The new current character is assigned and we move to the next step.
Lastly, we initiate the new current character's turn, shift the camera to focus on it, and if the character is a player character, have the player controller possess it.
Floating Text is a custom-implemented spatial UI system that can draw text to the screen in any color and opacity at any world coordinate. Practically it functions very much like UE4's "Print String, except it's spatial.
It is used for drawing damage numbers, abilities, status effects, and as a means of delivering useful game information to the player.
The demo shows this in action.
The "Print String" equivalent of the floating text system is implemented in the gamemode, as such it's callable from any blueprint. It takes a few parameters like color, text, location and duration, and applies them to a free floating text actor.
To avoid the performance hit of instantiating and destroying a floating text actor every time one is needed, I've implemented a system that keeps track of "free" floating text actors, and only creates additional actors none are free at any given time. Here's the implementation:
You can contact me at alannah.morrison7@gmail.com, I'll get back to you as soon as possible. Alternatively, I can also be found on the following platforms: