RPG Game

Unity Engine

Visual Studio

C#

GitHub

Summary

My RPG Game is a top-down action-rpg game. The player controls a character that can cast spells, collect loot, craft items, and equip items. Their goal is to travel across the map, discovering new enemies and collecting items.

I worked on this game for several months as a passion project, designing and coding all features myself in the Unity Engine. What sets this game apart from others in its genre is the spell-deck system. Instead of having a set number of spells available to them in combat, the player has a small hand of spell-cards that get cycled back into a spell-deck when used. This system encourages players to build creative loadouts that fits their playstyle.

While the game is still a prototype, it has several advanced features. I created a dynamic, data-driven spell system which allows new spells to be created using ScriptableObjects in the Unity editor. This system lets new spells be created easily by combining small 'blocks'. I also created the unit pathfinding system from scratch. The pathfinding system includes unit preferences for moving on certain tiles, allowing some enemies to prefertiles that favor them.

Design Choices

Spell Deck

Spell Cards are made to give players access to more spells during combat without having an overwhelming amount of options available at once. Player's can build their Spell Deck using Spell Cards acquired throughout the game. Spell Decks have a range of how many cards are able to be put in them, giving players flexibility in choosing to draw more spell variety vs. consistency.

Only having a limited amount of spells available at any time would give players the choice of using spells as they become available or waiting for a better time to cast it. This brings more variety to gameplay and prevents encounters from being the same set combo on repeat.

A potential downside to this system is that when spell cars are drawn, they're placed in the last spell slot used. Meaning that the same spell could have been used last while in the first spell slot but be placed in the last spell slot the next time it's drawn. The player would have to be aware of which spells they currently have available and in what spell slot they're in.

Enemy Pathfinding

I created the enemy pathfinding system from scratch to take into account the different tile types in the game. The pathfinding algorithm is based on the A* algorithm. Each tile has a weight to enter and exit. Enemies use these weights to determine the cost of including a tile in its path. These weights are determined by a tile adjacency graph created at the start of the game, connecting all adjacent tiles.

Each enemy type has a TilePreferences scriptable object that gives weights to each tile type. Tiles with less weight will be prioritized when finding a path. Because of this, certain enemies can prefer walking on roads over grass while others prefer walking on grass over roads depending on their TilePreferences. The system even allows for some enemies to be blocked by certain tile types such as water.

For demo purposes each enemy's path is shown in the pictures above.

Stats

A character's stats are increased by gaining more Base Stats. Base Stats such as Strength or Intellect give a range of character stats based on their play style. Strength promotes damage, Intellect provides utility, and other stats can promote other play styles. Stats are meant to be mixed based on the player's needs and preferences.

Stats are tied into the talent system by talents needing stat requirements. Any character can pursue any path in the talent tree if they equip the right amount of stats. If a talent requires a certain amount of Strength, the player can pursue that stat to unlock the talent.

Equipment

Equipment increases a player's power by providing stats. The main way to acquire new, more powerful equipment is through crafting. Crafting materials are found around the world and from slaying monsters. Using more powerful crafting materials will create better equipment.