A Diablo-like RPG
Let me proudly present my own take on the top-down RPG genre, combined with elements from my favourite game-series Dark Souls!
What started as a small free-time project evolved into four months of dedication, refining gameplay mechanics and mastering the implementation of Diablo-like features. However, this isn't just another mob-grinding RPG. My goal was to create a challenging and punishing experience inspired by Dark Souls, where strategy and precision are key. By incorporating a rolling mechanic, players must carefully plan their moves and dodge enemies to survive, making every encounter a test of skill and reflexes.
Features overview
Point to click
Hold or click the mouse button to move the character to that position
Move() runs while isMoving is true
In case mouse hit is Interactable
Buffered input
To make the game more responsive, I have implemented a "buffered input"-system. While doing an attack or performing a roll, the player can hit a key which performs another action during the current one, and when the current action is finished it queues the action the player has pressed.
Roll mechanic
When pressing space, the player performs a roll.
RollStart:
RollEnd and OnAnimatorMove:
RollUpdate:
IsCollidingWithWall
Event handler
For the Enemy AI, I used something called Event Handler. Every event has an OnBegin, OnUpdate and OnEnd function, and a bool that returns if event is done. The enemy has a List (that acts as a stack) where it keeps track off which current event is active, when when the current event is done it removes it from the list and proceeds with the previous event. Some examples of events are:
Enemy base script
This is the script that all enemies use as a base. The scripts consists of:
Enemy Event
This is the script I have used for the base of all the other event scripts. Every enemy-event like Idle or Attack inherits from this.
Some other functions that are inherited from Character script: