What is A Slime's Quest?

A Slime's Quest is a single-player dungeon crawler where you navigate your way through doorways of various sizes by shrinking and growing in size by consuming or touching mobs and goons. It features a procedurally-generated dungeon populated with environmental puzzles and boss encounters.

This project was created over the course of 2 weeks with the help of two other developers. A Slime's Quest was made using the Phaser 3 Engine and is playable in browser.

My Contributions

My main contributions to A Slime's Quest included the development of the algorithm that procedurally-generates each dungeon, designing and programming the environmental puzzles, and creating the first stages' boss, the Rock Boss. This was my first time creating any sort of algorithm that generates a playable space which proved to be a difficult challenge as there were several bugs and roadblocks that slowed development.

Procedurally Generated Dungeon

A Slime's Quest features two playable dungeons that are both procedurally-generated using and algorithm that I developed. The foundation of the algorithm relies on randomly populating a 2D array with "rooms" that are essentially playable scenes. Each scene within the array contains data relating to how how many exits the "room" has, the directions in which the exits lead (either Up, Down, Left or Right), the size of the doorway depicting an exit, how many enemies are inside the room, whether or not the room is a puzzle, boss, or normal room, etc. This algorithm was the result of lots of trial and error in attempting to populate the array with a string denoting exit directions that eventually developed into storing playable scenes with specialized data.

Creating The Dungeon

The algorithm for procedurally generating each dungeon first creates a 2D array containing data objects that hold information about what directions the room exits towards, what type of room it is, and the playable scene. The algorithm works outwards from a centralized index by creating exits in a starting room, accessing the rooms to which it has exits towards, making an exit towards the previous room, and then determining if more exits will be made for the newly accessed room. If more exits are to be made, it will repeat the process above and if not it will return to the room that previously accessed the current room, eventually returning to the starting room. This process creates a foundation for understanding the directions in which each room has exits towards and is utilized later on to create doorways along with loading and unloading scenes when entering and exiting a room.

Specialized Rooms and Scene Creation

After the algorithm has retuned to the starting room, it then finds candidates for the boss room and puzzle rooms and then alters the data object holding the type of room within the appropriate index of the array. It will then iterate through the array creating scenes pertaining to each room's type and updates the object containing the scene with this newly created scene. When exiting a room during gameplay, the scene pertaining to the room being entered is loaded after unloading the current room's scene. Phaser 3's scene data storing eased the process of preserving the state of a room and allowed for previously visted rooms to appear just at they were left when revisited.

Puzzle Design and Creation

Later in development the team decided that we wanted to add some sort of interactable aspect of gameplay to compensate for the lack of content within the game. We ultimately decided on creating environmental puzzles for players to solve while traversing each dungeon. I created the technical backing for designating whether or not a room contains a puzzle, the mechanics necessary for interacting with a puzzle, and the conditions needed in order to consider a puzzle to be solved. Puzzles essentially work by pushing pieces to specific white spaces found on the floor of the room and rewards players with the chance to purchase powerups.

Stage 1: Rock Boss

Each dungeon, or stage, within A Slime's Quest features a boss encounter that players must overcome in order to progress. I was responsible for designing and creating stage 1's boss, the Rock Boss. The Rock Boss' design went through a few early iterations that revolved around obstacles being dropped onto the player such as once central entity controlling several smaller ones that attempt to crush the player. This iteration proved to be challenging programming-wise and was ultimately scrapped for the Rock Boss' current iteration. I really leaned into the idea of having multiple entities chasing the player around and decided to give each of them differing stats relating to speed, how fast they track the player, etc. I later combined these entities with some puzzle solving to add to the overall tension of the encounter.

Get in touch