My Role - Gameplay, AI, UI Programmer // 2D rigger and animator
My Role - Gameplay, AI, UI Programmer // 2D rigger and animator
Genre - 2.5D strategic game on a grid
Engine - Unity
Platform - PC (Itch.io)
Team size - ~6 people (VioletSkybox)
Duration - 6 months
A 2.5D Strategic game on a grid that plays like a "puzzle".
Project made during my second year at Event Horizon School, in this project I handled everything programming-related, and for the first time I worked on 2D rigging and Animating on the Unity Engine.
These are the key contributions I made to the project:
Combat System - Implemented all features of the combat system, alongside 4 different Ai controlled enemies of which behaviour I've also implemented inheriting from a Base Enemy.
Next turn preview - Implemented a system that allows the player to see, when hovering with the mouse on an enemy, it's future action and position based on the current board state, in order to better plan his turn.
Turn System and Camera System - Implemented the turn system and the connected camera system that switches point of view focusing the current acting enemy.
Level creting system - Implemented a system to help designers make new levels, all implemented with scriptable objects.
2D Rigging and Animating - I decided to challenge myself and get out of "programming" for a little bit experimenting 2D rigging and animations using Unity's tools, I've rigged, animated and implemented all charatcters in the game.
The Combat System was one of the most important features I've Implemented for this game, The player has been given the ability to move on a grid, use 3 different abilities and attack enemies.
I've also implemented 4 different enemies with unique behaviours to face the player through the game.
Furthermore, I've also implemented power-ups and grid modifier that the player can use to work himself through levels but can also get picked up by enemies.
This is the base class for all enemies, it Inherits from another class I called Unit, I made it to contain all basic variables and informations that an Enemy Unit would need, for example the PathFinding class, which is the class that will dictate the unit's movement using a modified and adapted A* Algorithm.
The basic behaviour of all Enemies is also implemented inside this class overriding some Unit's virtual functions and defining other virtual functions that each Inheriting enemy class overrides to specify its unique behaviour as for Example the IEnumerator EnemyAction() function that will handle the Enemy unit's actions during its turn; or the OnMoveNotPermitted() that dictate the enemy's action in case it cannot move towards the player or attack it.
Satyr
Ram
Cloud
Zeus
The Next Turn Preview is a system that I implemented that allows the player to look at the enemy's intention before deciding how to approach his turn, the intention, attack or move, will be displayed as an icon beside the enemy while the movement will be displayed on the grid; this was quite the challenge to implement since it required several systems to communicate between them and a lot of forward calculations.
The first thing I did when I was asked to create this type of system was to hop on draw.io and start making some diagrams about what I thought I would need and what would have been the process of it all. It started in a very simple way:
Since I already had a movement function for each enemy I thought I would just need to create a function inside the Enemy class to "fake" the movement and have the final position returned.
I then created the Vector3Int CalculateTempEndPos(Enemy enemyUnit,Vector3Int from, Vector3Int to) function which based on the type of enemy and the Energy it had would calculate the movement and return the final position of said enemy in the form of a Vector3Int. and after giving the grid tiles the possibility to display a movement in the form of a path and creating the system to support it I tested the feature.
The system soon started to show some problems:
The path shown was not reliable due to the future board state not being truthfully represented at the moment of the mouse hover on any enemy that was not the first to act.
Still needed a way to detect if an Enemy would've attacked on its next turn
It was clearly time to hop back on draw.io and make some adjustments:
The new diagram seemed more convincing, I soon defined and implemented new functions to support the system:
void GetFutureOccupiedTiles(Enemy unitToCheck) inside the GridManager that takes in Input the Enemy whose intention we want to know and generate a new state of the board, cycling all enemies until unitToCheck, making them calculate their future position, freeing the tile they're currently occupying and setting the tile corresponding to their ending position occupied by them.
I also needed to keep track of the original board state in order to reset it once the player stopped using the preview feature. And so I created a
private Dictionary<Vector3Int, Enemy> variable to keep track of all the modified positions.
To show the action Icon correctly I made public virtual void WillAttackNextTurn(), a virtual function that each enemy overrides that directly updates the icon in case the conditions for attacking are met and gets called on every player's action.
Enemy Turn Preview
Actual Enemy Turn
This was my first really big project and the first time with this genre of game, I was able to learn a lot thanks to it and I Improved quite a lot on the organization of my work, creation of expandable systems and data structures.