How Risk Of Rain Increases Difficulty Over Time

This is The Mechanic, where Alex Wiltshire invites a developer to help him put their game up on blocks and take a wrench to hack out its best feature, just to see how it works.

The start of a game of Risk of Rain [official site] is quiet. Your small pixel character stands in a vast alien landscape, in which somewhere you’ll find a teleporter that will take you to the next level. The end of a game of Risk of Rain is mayhem, the land swarming with monsters that you couldn’t survive.

And throughout lies constant stress and pressure. You’re ever aware of a meter in the top right corner of the screen that ticks upwards. Every five minutes, a bell chimes and the difficulty changes: from Very Easy, to Easy, to Medium, and further. The constantly respawning monsters come ever thicker and harder, inexorably escalating towards unmanageable chaos. You must never stand still and must never relent, because with every second your own downfall nears. All because of:

THE MECHANIC: Time = difficulty

That’s Hopoo Games’ feature list term for the system that shapes Risk of Rain’s distinctive take on the action Rogue-like. “The longer you play, the harder the game gets. Keeping a sense of urgency keeps the game exciting!” Or stressful. Because if you’re not collecting XP or items and powerups, or if you’re not progressing to the next level by triggering the teleporter, you’re making everything harder for yourself. Richard II had it right: “I wasted time and now doth time waste me”.

Time = difficulty is also there to serve a specific purpose. It works a little like the action equivalent of the hunger mechanic in a traditional Rogue-like, but Risk of Rain has extra need for it. Unlike most Rogue-likes, its levels endlessly spawn monsters until you trigger the teleporter and survive the resulting 90 seconds of waves of enemies. Without time = difficulty, its levels would be endless sources of XP. And because levels are speckled with finite numbers of items, which transform your powers, XP isn’t enough on its own to face the rising difficulty level.

So Risk of Rain confronts you with a choice. “There are two extremes. One where you run right to the teleport and turn it on and then go right in. That’s how I like to play,” says artist and programmer Duncan Drummond. “But a lot of people have success where they clear the entire map and open all the chests.” The game is balanced so that both options are viable, give and take.

And give and take is very much the way Risk of Rain works. As much as the difficulty meter moves through five-minute increments towards its highest setting, HAHAHAHA, behind the scenes it’s actually increasing in one-minute increments. That’s to avoid facing a jarring step-change in monster-toughness and damage every five minutes. With more gradual increments, the challenge is smoother. On the other hand, as you gain items, you get sudden boosts in power, lending the game a rhythm of power and weakness as you surge ahead of the monsters, and then find them catching up with and surpassing you again.

So what does the rising difficulty actually do? Every minute, the game raises a value that represents the monsters’ net power value. This value then scales monster health semi-exponentially, and scales their damage output semi-logarithmically. The difference in scaling reflects the different ways your character increases in power. Items mainly affect your damage output, and the way they stack and complement each other means it tends to rise exponentially over time, so the monsters’ health rises to match.

But your health gains are mainly caused by levelling up. Because you need increasing amounts of XP as you level higher, your health gains slow down over time in a logarithmic progression. Also increasing monster damage logarithmically helps to avoid late-game situations where you can be doing huge damage but be susceptible to one-hit deaths. “We weren’t big fans of that kind of gameplay,” says Drummond. But late in development, he and partner and lead designer Paul Morse added items that raise health or reduce damage by a percentage, helping to make players’ health curves a little more linear.

The result is a system that’s governed by time on one hand, and on the other by you striving to develop your character. But the asymmetric way the monsters and you develop leaves some fantastic spaces during a game where the challenge suddenly drops, making you feel powerful, and suddenly rises, making you panic.

This wasn’t exactly the plan at the beginning of development, when Drummond and Morse had just started their sophomore year at University of Washington. Then, Risk of Rain was going to be a kind of base-defence game, in which you had to protect your crashed ship from monsters, and the difficulty rose with distance away from it. But the idea didn’t work. “We realised players wouldn’t have motivation to go far,” says Drummond, and so the difficulty = time system came in as a way of keeping players moving and exploring.

They’d also planned at this stage that the speed at which you killed monsters would adapt the scaling. “But from a design point, it took out your highs and lows, and I think that’s what’s really interesting about the game: when you feel you’ve broken it, for a little bit at least. Or if you feel absolutely overwhelmed,” says Drummond. “If we did the scaling with you correctly, I think it’d make every round feel the same.”

“Monsters would scale to you, so it wouldn’t be that rewarding,” adds Morse. The vast bosses that appear during the teleport countdown, however, do scale to you, hitting you for a percentage of your health, and they’re designed with one attack that reduces your health to one, and another that makes them invincible for a period. “So they feel kind of scary no matter how strong you are,” says Morse.

The difficulty system doesn’t only affect monster power. It also raises their numbers. Spawning is driven by an AI that is given a certain number of points a second, at a rate that’s scaled to the difficulty level. Each monster costs a certain number of points; a lizard is five, and a boss is 800 points. Every two to 15 seconds, the AI attempts to buy monsters. If it, say, has 40 points, it might try to spawn as many lizards as it can, which would be eight, except if the AI can spawn five of a single monster, it will instead spawn a super version of it.

This ‘affixed’ monster is a lot harder to kill but is more rewarding, and also gives combat an extra level of dynamism. Yet, as it happens, the whole affix system only came about because of the limitations of GameMaker, in which Risk of Rain is built. As the difficulty rose and the game started spawning more and more monsters, performance would drop. Affixes essentially take five monsters and combine them into the computer performance of a single monster. “I don’t know if it was lucky, but it’s a merge of game functionality and game design,” says Drummond.

There are 110 items in Risk of Rain. There are many types of monster, two complex systems governing their power and quantity, and all the different player classes. That’s a lot to balance, but Hopoo pushed the main balancing factor towards monster quantity, knowing that raising their health as a means of making them balance would risk creating boring bullet sponges.

Item balancing, though? “You can definitely break the game if you accrue a specific set of items,” says Drummond. “You’ll be invincible or kill everything on-screen without moving. But I think that’s perfectly fine for a singleplayer game. That’s the real fun part.” The game deals items semi-randomly to you – chests and shrines dole out single random items and sometimes you have a choice of three random ones – which mitigates some of the potential for becoming overpowered in the early game.

But knowing the value of items is still down to player experience, and for those who have played Risk of Rain a lot, the most valuable items are those that lend mobility. That’s because extra jumps and speed negotiate with the game’s real economy: time. As Richard II probably would’ve added if he hadn’t been murdered, waste less time, and time doth waste you less, too.


  1. vahnn says:

    Great read! I played the HELL out of this game with a couple buddies, it’s a total blast. Nice to get some insight behind the scaling if the difficulty. And now is time for a reinstall!

  2. Premium User Badge

    gritz says:

    “Time = Difficulty” pretty accurately encapsulates getting a 4 player game of RoR setup.

    I know pixelart graphics are supposed to be a retro experience, but forwarding ports and looking up external IP’s with a completely uninformative “minimalist” multiplayer UI is not the kind of nostalgia I was looking for in 2015.

    • Synesthesia says:

      This, so much this. Hosting a game is nigh impossible. It’s a nice game, but i’ve literally been able to play it just once. It’s a shame.

    • kalzekdor says:

      This article unexpectedly dropped a little tidbit that made the crappy UI in this game make sense. It was made using GameMaker, which is a somewhat limited platform. It just doesn’t have the flexibility that a code-based engine does, and it shows in a lot of little ways. Like being unable to paste in the IP entry box.

  3. jonfitt says:

    I liked RoR but I am absolutely rubbish at it. I think I made it off the first level one time.
    It got brutally difficult for me quite quickly. I’m someone who likes to explore the map which is probably the worst thing for a new player to do.
    However when I rushed to the teleporter without getting many powerups I found that the boss would annihilate me.
    It just made me feel like I didn’t “get it”.

    • wyrm4701 says:

      I think everyone’s rubbish at it, at least at first. It rewards multiple playthroughs with persistent unlocks, and it didn’t get even slightly easier for me until I started playing to unlock characters, instead of ‘winning’. Though if you’d rather not expend that effort over time, I believe you can edit a text file to unlock the characters that may be more suitable to your playstyle. This is because the devs are really, really awesome.

      Give it another go, it’s a fantastic game. Especially if you get to the point where you “break the game if you accrue a specific set of items”.

      • jonfitt says:

        It’s on my list of games to go back to along with Teleglitch which I also am bad at (less so).

        I’m not generally bad at games, but I find these two quite punishing. On a positive note I am doing quite well in Not A Hero which I recommend, and I am a Broforce hero.

    • Siimon says:

      For the first maybe 2-3 hours me and a buddy felt like we where awful. Truly AWFUL. In fact, I gave up the game after the first 30-40mins and only came back to it much later and gave it another go. Once we started figuring it out though it became one of my favorite games.

      Unfortunately, the game becomes very (very!) easy after a while. I beat the game and unlocked all the 10 artefacts(?) that modify the game, and even with all the difficulty modifiers turned up me and my buddy can breeze through the game :/

      I want more RoR!

      • jonfitt says:

        Any tips for a noob? What’s the secret to surviving and thriving?

        • vahnn says:

          Mobility. And not playing as the Bandit.

        • Siimon says:

          Keep moving. Always. Dodge-rolls/teleports are vital. If you have a block/dodge skill, learn to use it!

          Play on Medium difficulty, which isn’t that much harder to begin with, plus you get to keep some progress even if you die.

          More or less rush through the level to find the Portal, stopping only for chests direct in your path, then you can go back and get chests etc while killing enemies and waiting for the timer to go down. Until you open the portal enemies are endless.

          Learn what the items do, I know it is a lot of trial-and-error at first – just pay attention :) Health regen / life steal is pretty great.

          • Siimon says:

            Oh, and don’t forget jumping or circling up and down ropes/platforms as a method of evading shots/enemies.

          • Danley says:

            Don’t do this on the first level, especially on hard, or you usually won’t make enough coin to buy all the items on the stage, and won’t gain enough levels to be effective in Level 2. If you’re not ready for Level 2, you’ll have to grind it out and will be perpetually catching up.

            This seems to only be the case on the first level. All the others, if you see the teleporter, you might as well hit it right away then spread the spawns out over the level looking for the rest of the items (which is usually the smart way to go since a group of even weak enemies can all damage you at the same time and kill you if you get stuck in the crowd).

            I keep starting to type out a full guide, since this is one of the games I’ve played the most this last year, single-player, local co-op and online. In short, you need enough mobility not to be outrun, enough DPS to kill swarms quickly and plenty of healing (and/or shielding). At least one double-jump is essential, while multiples are just fun. Also, an army of drones will almost always win the game for you cause you can just run/jump around while they attack.

  4. ExitDose says:

    This game not getting a sequel bums me out.

    • Jalan says:

      The way the game’s composer has tweeted of late, there may or may not be a sequel in the planning stages.

  5. Halk says:

    I don’t get why this game is so well liked. I wanted to like it, but the level repetition and the nonexistent enemy AI really sap the fun out of it. I wish they created more versions of the same levels, which given how basic they are would not take much time, and they made the enemy even remotely competent at navigating the environments, instead of being defeated by the most tiny of gaps or by a little step. After a bit the combat is reduced to gaming their “behaviour” to compensate for being underpowered.

    • vahnn says:

      Yep, you herd the enemies and kill them. What’s not to like? Have beaten the game? It’s about finding a character you like and finding awesome items in game to turn him into a murder machine on a massive scale. What’s not to like?

      • Halk says:

        Well, the best, and sometimes only way to deal with enemies (and bosses) is not to dodge skillfully while effectively using your skills, which is what the game is supposed to be about, but to jump over a little gap and then pelt them while they walk back and forward without doing anything.

        I did beat it, and liked to use the beast guy, but most enemies really don’t do much other than move horizontally towards you, which is a problem when the challenge is supposed to come from them swarming the player. Add the very repetitive levels, and you really take out the enjoyment of what could have been a really great game, especially in coop.

  6. Spakkenkhrist says:

    It doesn’t get mentioned enough that the music in this game is absolutely fantastic.

  7. JamesPatton says:

    Oh God yes. The soundtrack was how I found out about this game. Masterful.

  8. DelrueOfDetroit says:

    Huh. I really need to get around to playing this bad boy.

  9. Phasma Felis says:

    I played for a few hours with the starting character (Commando?) and couldn’t ever get it to click. It seemed like he isn’t fast enough to keep away from enemies for long, can’t hit hard enough to bring them down quickly, his defensive roll can only be used once every four seconds, and while most enemies can’t hit you while jumping, you also can’t attack them–so no matter what you do, eventually there will be so many enemies swarming around you that you get beaten down the moment you stop to shoot at them.

    Eventually I unlocked the guy with the shield (Enforcer?), and he seemed more survivable, but whatever the trick is for the Commando, I never figured it out.

  10. ropeladder says:

    I found Risk of Rain really frustrating as a single player game. The time mechanic made the game far too dependent on whether the level was arranged conveniently, so you had a sort of double skinner box: you had to get lucky with items, and you also had to get lucky with level layout.

    The gameplay was generally pretty fun, it was just too much at the whim of random numbers. I didn’t really play multiplayer, but it seemed like it would be a lot more balanced if you had a few more players running around the level.

    • jalf says:

      I played it with a friend, and yes, it is amazing as a multiplayer game.

    • Viral Frog says:

      I’ve never played a single multiplayer game in my 20+ hours and I love it. Although MP would be far better, I hate trying to get it to work (never been successful). I’ve almost beaten the game solo quite a few times. The trick (for me) is using the Enforcer, stacking him with speed and mobility items, and making sure your shield is always up. I might need to go back and sink some more time into it. I ended up distracted and haven’t touched it in about a year now.

  11. Raoul Duke says:

    How hard could this algorithm have been to write?

    In pseudo-code:

    If (level > 1)
    difficulty = difficulty * rand(10)

    Maybe my copy is broken, but somewhere between the 2nd and 5th level of every playthrough I randomly get sent to a level where the enemies are literally 10x tougher than the previous level and it’s basically unbeatable.

  12. SlyMinouQc says:

    I know lot of people are having hard time setting up the multiplayer and port-forwarding, and i was the same before i saw this little video. Took me about 20min to set it up, asked my friend to join my game and it worked like a charm. We still died pretty quickly cuz we suck at the game but it was way more fun then solo (even tho i really enjoy it !)

  13. warthogboy09 says:

    My one gripe in an otherwise absolutely stellar experience in this game is a bug that occurs on the sand map where you fall off the screen after moving screen right to a point on the map. this makes the level unpassable if the teleporter is over there. ive had it happen several times and never figured out what caused it. But i definitely think everyone should try this game anyway. it is outstanding.

    • Danley says:

      Yeah, there are collision bugs that force you to end the game sometimes, which is a shame. Even worse is when you fall off a ledge and it warps you back to spawn but the camera doesn’t catch up quickly enough and you end up spawning inside of the platforms you usually walk on, and then there’s no way to get out. (Or none I’ve figured out yet — I get the idea this is actually a secret mechanic I don’t fully understand, since sometimes there are items inside the platforms.)

  14. Robmonster says:

    The game screenshots are all the same in this article. Is that some in-joke I’m missing?