top of page

Drain

Basic Info –
  • Engine - Unreal Engine 4

  • Genre - Twin-stick Roguelike

  • Design Goals - Prototype a Procedurally Generating Twin-Stick shooter where players spend their health as a resource during their run.

Prototype Overview - 

Drain is a prototype custom-built in Unreal Engine. The main mechanic is Twin-Stick Shooting similar to The Binding of Isaac or Enter the Gungeon. Players spend both their maximum and current health to gain upgrades and abilities during a run and must progress for as long as possible.

This prototype only encompasses some of the mechanics and enemies that would be present in a finished version of this game, and is right now mostly just a very early build.

Procedural Dungeon Generation -
 
Design Goals
Dungeons in Drain are procedurally generated by adding different possible rooms together like puzzle pieces. The metaphor I like to use is that there is a grab bag of possible rooms (pieces) and the system picks one at random to connect to an old existing room. The rooms themselves are not procedurally generated though. Each room is a piece of individually authored content. I chose to architect the system in this way to allow myself as a designer to have finer control over the generated experience of the player. This system means that I can create specific gameplay moments that I want the player to experience during a run, and be relatively confident that they will experience these moments. Since I have that option I'm able to create rooms that can highlight the advantages of certain player abilities or playstyles.

Generation Script - Overview
The Generation Script is somewhat based on Prim's Algorithm. Prim's focuses much more on creating a minimum-spanning tree than my solution does as my design does not need a shortest possible path to the exit. Since the design goal was to have players last for as many floors as possible a minimum-spanning tree doesn't add much. A meandering pathway (or conversely an extremely short one) creates exciting or tense moments for players to experience and can help to prevent the overall experience from becoming stale. My system begins by creating a tree of points in space arbitrarily, and then begins connecting those points together. Once the points are all connected in data, then rooms can be spawned in and connected together by placing them in 3D Space.

Generation Script
The generation script was built in Blueprint in Unreal 4 so I had to work around some limitations. The most problematic limitation is that Blueprint cannot access the content browser or assets in memory somewhere without spawning them. This means that the first step for my generation script is to spawn every possible room for that floor and store it in the appropriate sorted array to be accessed later. Once these rooms are all placed in the appropriate location, then it begins manipulating the data for the tree where rooms will be spawned (as explained above). Once that data is done and all the rooms are spawned, then rooms can be set up depending on their contents, and this is where another portion of generation can come into play. Some assets in rooms can be 'generated' in a sense that they are randomly swapped out for different ones. Currently the only example of this is in wall assets. (I'm modeling everything myself as well, which slows this process down a lot)

The Dungeon Builder script is visible below in an interactive format you can navigate around it just like a blueprint.

Dungeon Generation V3

Spending Health as a Resource -
 
Design Goals
I chose to avoid implementing a money system in the game and instead opted to use the player's health as a currency for any sort of 'purchase' the player is going to make. This makes every decision more meaningful for the player to interact with and also helps me create a stronger separation between strategic decision making and twitch reaction gameplay. By separating these two gameplay styles I can help prevent the game from feeling stale for longer, and also implement two opposed gameplay aesthetics into one experience while preserving what makes each type of decision meaningful in the experience. I'm also using each gameplay style to enhance the other and give players different ways to think about what is the most prudent decision. The ultimate goal of spending health in this way is to force players to truly consider the value of the decision they are making.

Spending Health in Different Ways and 'Health Holes'
Spending health as a currency presents a big problem quickly: how does a player dig themselves out of a 'health hole'? (Where they have spent so much health that they can no longer realistically defeat the rest of the enemies and complete the game.) I've taken some measures to solve this problem (which I'll go into detail about further down), but, I don't think it should be totally removed as a possibility. Initially, it was something to do everything I could as a designer to prevent, but after building the title and having some playtesting done, I decided to keep it in as a potential consequence. Originally the game was designed to end after a certain number of floors. I switched the game's design to be endless runs towards the end of the development cycle because this would incentivize players to stretch their resources when making decisions and can help to support skill expression in the game through mechanics like the absorb ability.

On top of this, spending health is characterized in two different ways: Spending max health, and spending current health. This decision was made relatively early in the design process to solve a specific problem - what I've taken to calling a 'Health Hole'. A health hole is a situation where a player could spend so much health that they can never realistaclly recover without being wholly cognizant of what they are doing to themselves. To solve this I've set up the ways players spend health to function mostly on spending current health. Anytime the player spends health while in an active dungeon, they are spending current health. The only time that the player spends maximum health is when they are buying abilities at the start of a run, or when they come across a conversion shrine. A conversion shrine is also present at the beginning of every run. A conversion shrine is a fancy name for a shop that sells stats for maximum health.

By setting up the system in this way I can mitigate the risk that a player will spend maximum health without thinking about it. The scenarios where player's can spend maximum health are limited to areas with no enemies and therefore no danger. This gives players the time they need to really consider the weight of the decision they are making.
Player Abilities and Tutorializing the Game Mechanics -
 
Design Goals
The abilities have all been designed to support different kinds of play and different levels of skill while simultaneously being used to teach the player the gameplay mechanics. I like to create that can solve multiple problems in the gameplay space and the abilities (and subsequently their tutorial) are intended to accomplish this. When the player launches the game they do not load into a traditional main menu screen. The 'main menu' is a playable level that looks like this:
first room.jpg
In order to select a menu screen option the player has to physically move onto it, and in order to play the game the player must shoot the target. This forces the player to learn the two most basic actions the player can take before they can even begin getting close to gameplay. This way, as a designer, I can ensure that the player has the requisite knowledge to begin playing the game.
This idea has also been applied to the abilities the player has. The player can choose 1 of 3 abilities:
  • A shield that prevents all damage while active, but reduces movement speed
    • This is the simplest and easiest ability. It can be kept active for the longest amount of time, and only requires a very simple input.​
    • The shield recharges over time when not active.
  • A dodge roll that prevents damaging effects while rolling​.
    • This ability has a short cooldown and prevents damage while rolling so it is a medium difficulty ability.​
    • ​It is powerful but only if applied correctly, but, the application of the ability is relatively simple. (Just dodge roll through projectiles).​
  • A damage-absorbing ability that converts damage taken into health while active.​
    • This is the most complex ability. The active period is very short and must be clicked frequently to make good use of the ability.​
      • The timing is something similar to a parry in Dark Souls or a fighting game.​​​
    • However, this ability is the most powerful of all. It completely negates damage while active, and can even heal the player which can be used to fund purchases while in the dungeon.​
 
The player is taught the basics of using these abilities in a very similar way to the initial learning of movement and shooting. After purchasing an ability the player must enter and succeed at a small challenge designed to highlight each ability. The player cannot enter into the dungeon proper until they have completed one of these challenges. The Shield and Dodge Roll challenges require the player to leave the room without taking damage, and the Absorb challenge requires the player to heal back to full hp.
bottom of page