
Ransacker
Dungeon Crowler + Inventory Management Roguelike
Ransacker is a real time inventory management & dungeon crawling roguelike. This project initially started as my entry for the 2023 GMTK Game Jam, but I decided to continue working on this to release a fully realized version of the game.
Engine: Unity | Role: Lead Developer | Team Size: 2 | Duration: Ongoing (1.5 years)
Designed the core mechanics and systems for the gameplay loop.
Designed the attacks and mechanics for each enemy.
Implemented an inventory system along with a "hotbar" where the player places the items they want to use.
Added item system utilizing ScriptableObjects to allow for rapid content creation & balancing.
Implemented randomly generated stats for items.
Created a difficulty scaling utilizing an easing function.
Created a bespoke weighted loot table system for enemies.
Enemy weakpoint system & item effect system.
Procedurally generated grid map for the dungeon’s floors.
Engineered every system to be configurable using the inspector.
Prototype Gameplay
Implementation: Items
Items are split into three types: weapons, equipment, and consumables.
The base item script, ItemDataBase, contains the data tied to every item such as it’s sprite and name.
WeaponItem, EquipmentItem, and ConsumableItem hold the data unique to each type respectively, as well as any functions needed to use that type of item.
These scripts inherit from Unity’s ScriptableObject class, allowing new items to be created as assets inside the project each with their own data.
The InventoryItem script represents an instance of the item in the game and is attached to the item prefab object, which when instantiated will mirror the item data that is set to. InventoryItem also contains the data that is unique to that instance like it’s stats and final gold value.
Implementation: Inventories
The inventories in Ransacker consist of 4 scripts, an implementation of InventoryGrid along with InventoryController, GridInteract, and InventoryHighlight.
InventoryGrid is the base script for all the inventories in the game handling placing/inserting and removing items. The inventory is stored as a 2D array where the x, y positions an item takes up are the indexes of where that item is in the array.
InventoryController handles the mouse inputs and logic for picking up and placing items as well as when to highlight hovered items.
GridInteract handles setting which inventory the player is currently hovering using a collider.
InventoryHighlight handles the item highlighter game object, containing functions to change it's size, position, and visibility
Obstacles:
Implementing multiple mechanics and gameplay systems from scratch was a large undertaking at the start of making this game, which pushed me to learn more about properly designing a code base and when to use different data structures.
Staying within a scope for this project, with this being the first larger game I've made, was something I struggled with at the start where I would keep slightly shifting the goal post forward. I dealt with this by making a list of every feature I believed was necessary for the game to be functional and completing only those features first.
Adding features like procedurally generated maps required implementing a pathfinding algorithm to verify valid maps, and learning how more advanced algorithms like the A* algorithm work and is implemented was one of the more difficult parts of making this game.
Takeaways:
Designing and implementing this game on my own made me realize the complexity of creating and maintaining large code bases as well as the range of programming skills needed.
The importance of having a consistent process for designing new features, overcome design problems, and iterate on existing features to make them more fun.
Planning ahead and creating a GDD before tackling a larger game like this would have saved a lot of time and effort spent on lower priority features.
Doing QA processes such as unit and regression testing to verify functionality of new code or previously implementing features, could have mitigated some of the time spent fixing issues with the game.