top of page
Project Details
Hoarder is a procedurally generated dungeon rogue-like game designed for two players, which was created using Unity as a Year 2 assignment by Lincoln and me. The game offers players the option to play as either a swordsman or a ranger, allowing them to explore the dungeon and collect modifiers while interacting with special monuments to battle waves of enemies. The primary objective of the game is to locate and defeat the boss, utilizing weapons and skills acquired during gameplay.
Our Inspiration
We were inspired by a very famous Rogue-Like multiplayer game, Risk of Rain 2. We liked the mechanic of exploring different areas and collecting items as modifiers to increase our powers, as well as the combat mechanic where players can fight different monsters, scaling based on the tie played in the game.
Gameplay loop
Players will be able to choose between two characters, Swordsman or Ranger. The game requires a controller to play, alongside a keyboard and mouse.
Players will be spawned inside a procedurally generated dungeon, where each generation will always be different. They will be able to explore the dungeon tiles, fight enemies, open chests, destroy structures as well as interact with monuments to get perks. They will have to work together to find the boss tile, where they can continue the run and increase the difficulty of the game if they defeat the boss.
Role
Lincoln - Programmer, Artist
Me - Programmer, UI/UX design
I handle mostly the Modifier System, Interaction System the shrines chests, as well the all the UI/UX design.
Modifier System
The modifier system is a system where players will be able to collect items(modifiers) and increase their base stats by a certain amount based on the modifier collected. There were three main rarities:
​
- Common
- Rare
- Legendary​
I used Scriptable objects to store the data for each modifier, such as the type of modifier, and the stats to upgrade. Using an interface, when the player collects the modifier, it will check for the IModifier interface, and call the Modify function respective to the player that collected it. This will make it easier for me to define what stats to upgrade, without needing to reuse code on different types of modifiers.
For the UI, whenever the player collects the modifier, it will send an event to the designated player UI, which in turn will show the modifier collected and the count for that modifier. It will update as well when the player loses a modifier.



On top of that, I added a weighted probability calculator, that would determine which modifier would be dropped from a chest or enemy, based on the weight assigned to the different rarities of modifiers. It will get the total weight of all the rarities, and get a random number between 1 and the total weight. It will then loop through each rarity from biggest to smallest, and subtract the weight of the current rarity from the random number generated. Once the number goes below 0, it will return the current rarity in the loop.
Interaction System
Our game comprises many interactable objects, and I wanted a simple way to interact with these "Interactable" besides using a simple On Trigger function for each interactable.
I did some research and found this guy, Dapper Dino, who did a simple interaction system using Raycast and interfaces. I decided to use that same concept for this system.
I created an interface called IInteractables, which would be inherited by all interactable members, and had three main functions:
- Interacted
- StoppedInteracting
- CanBeInteracted
Whenever the player is in range of the interactable, CanBeInteracted gets called and will run the code based on the interactable the player is near. When the player interacts with it, it will call the Interact functions. The same goes when the player stops interacting with the interactable.
This made it easy for me to create interactables as I just had to define what would the function do when they were interacted with,vice versa.
This was one of my favorite and most memorable game that I developed with my friend, as I managed to learn a lot of new ways to structure code, such as using interfaces and event systems to allow scripts to communicate with one another.
bottom of page
