This is my first attempt in making an RPG game and it’s systems. I used a Udemy tutorial make this game. This game was made using Scriptable Objects, Unity Actions and Events to separate logic from presentation, Singleton Pattern for the managers, Finite State Machines for Enemy AI, Interfaces like Idamageable, Unity’s new Input system.
Here are some of the features of this RPG.
Player Inventory
Player has an Inventory system. Using which the player can equip weapons, use items and discard items. The items in the Inventory system are based on Unity’s scriptable objects and are stackable.
Map & Storyline
The player is an adventurer in a village with wandering NPCs. Quests and Shop NPCs. With a scriptable objects based dialog system.
Here’s a quick look at the village.
Quests System
The game has a quest system via NPC interaction. The Quest Panel is populated using scriptable objects quests. Each quests shows Exp, items and gold. Once quest is accepted, it shows up in Player’s quest panel along with quest status. Once quest is completed, it can be claimed leveling up the player and receiving quest item.
Combat FSM
The enemy AI uses a Finite State Machine. These are the states it has: Wander, Patrol, Chase and Attack. Player weapons have 2 types. Melee or Ranged. Ranged weapons use Mana. Player can swap between weapons through the inventory. Player can obtain weapons by killing enemies, completing quests or buying them at the shop.
Here’s an example of one of the FSM state. Chase.
Loot System
Enemies give the player Exp when killed. Upon death they also leave behind randomized percentage based loot. The loot is scriptable objects for items and weapons. Player can swap weapons through the inventory.
Level Up and Stats System
All Player stats come from a single scriptable object managed by Unity Events and Managers using Singleton pattern. The level up system has the following components.
Attributes: Player receives 1 Attribute point per level up.
Strength, Dexterity, Intelligence
Shop
The Game has a NPC run shop. The shop contains scriptable objects items matching the player’s inventory. Player gets Coins from completing quests. The player can spend coins at shop to buy items like Health potions and Mana. Weapons and crafting items.
Reference: Udemy link to the course. I added some extra features to my game.
https://www.udemy.com/share/10a5823@Z0VgPnOlGl2lbOf2wtc65-SDd8IBbj_F548ImRpQb49whrykR3fFMqf71IVMKQ1n