top of page

Legacy
Miners

Legacy Miners is a game I made in Unity with a team of fellow student designers and programmers over the course of a full year.

It is a procedurally generated rogue-like. Inspired by games like Rogue Legacy and Terraria.

​

Due to having one programmer for every four designers, I ended up having a hand in almost every system of the game, however there are a few highlights.

Custom Movement

Unity rigidbodies have an issue, when multiple hitboxes are present in close proximity to one another things break. This can have varying results based on the collider type, box colliders get stuck occasionally, circle and cylinder colliders will do a minor hop. While this usually isn't a problem, in a game based around mining your way through individual blocks it's easy to figure out how bad those problems might become.

 

The only feasible solution was to completely write a movement system from scratch. While it did go through a lot of bugs, we eventually managed to get a system consistent enough to be alright putting in the game. With a variable height jump, and tight collision mechanics it can often feel like the rigidbody system.

DigGame2.png

Level Generation

Contending for the feature I am most proud of in the game is the level generation system. When we first got out of pre-production we had a functional but understandably hastily put together generation system made by another programmer. Due to him being needed for other systems, I ended up taking it on.

​

This system ended up being split into 4 processes: smart tiles, level objects, scatter objects, and level elements.

​

Smart tiles are the foundation of the entire generation system. Initially we had a set of three visual layers, the designers needed an object that could mimic the look of any given layer it was placed in for the purposes of level elements. This eventually lead to a functional difference between layers after I realized that the behavior of a smart tile checking its height could be applied to the game at large. Eventually this system would be enhanced by having smart tiles on the boarder of a layer not strictly follow the 'correct' sprite and instead use the nearby layers sprite. This is done by allowing the y level of a tile be offset by a random amount when it checks what sprite it should have. This serves to give a more jagged and natural look to the level.

​

​

​

​

​

​

​

​

​

​

​

Level objects are a pretty simple system, placing single blocks (usually ore) around the level. The reason they're so important is they use the the reserve system. In order to avoid putting Smart tiles where we shouldn't, any space we don't want to automatically generate dirt in is reserved, this also stops things like two ore spawning on top of one another.

​

Scatter objects are similar to level objects. The difference is they generate a cluster of a given block instead. Using a recursion algorithm that causes the chance of an additional block spawning to go down the further from the source the cluster gets, we managed to get unique shapes for various objects that we wanted the player to have several of.

​

​

​

​

​

​

​

​

​

​

​

Finally level elements are rooms the designers created as little mini challenges. This presented a unique issue as these rooms could range wildly in size. Eventually the solution we came to was to have the designers put in a special object into each room where they would then input the bounds of the room which the generation system would then read, and be able to reserve the right amount of space for the room.

DigGame0.png

Inventory System

The inventory system is the part of the project I am most proud of from a designer experience perspective. While it does have some interesting ideas and problems under the hood, where it shines is its usability by designers. This system would eventually lead to my item creation tool as I tried to come up with ways I could improve even further on this system.

​

The system uses unity's scriptable objects in order to allow designers to make items, equipment and usable items (both child classes of items), crafting recipes, and drop tables that are used for both blocks and enemies. All of these aside from drop tables use unity's custom editor function in order to show the sprite of the object in editor to streamline the process of finding a given object. All aspects of these objects are customizable by designers through unity's editor. Combing the reusability of all these objects with the fact these systems covered every part of the users interaction with the inventory system, the ease of use for designers saved a lot of time and likely saved a few less code inclined designers their sanity.

solid-color-image.png
Editor2.png
Editor1.png
DigGame1.png
Editor0.png
bottom of page