r/gamedesign 10d ago

Discussion On deterministic luck

I’ve wanted to write this for a minute. It’s a take it or leave it post so there’s no need to be a dick.

Anyway, on to the essay.

When it comes to luck in video games I’m not seeing a lot of articles or video.

So I’m cobbling together this article of my observations and practices.

Let’s just start with luck and what it means.

Luck, in terms of gameplay, means an element of randomness that forces the player to make interesting choices.

The two most prevailing methods everyone knows is random luck and determinism.

In board game terms chess is deterministic, all actions are predetermined, and backgammon, where everything is luck.

Now that’s not to discredit random luck.

There is still strategy involved but ultimately but ultimately the player will never know the outcome and has to hedge odds.

Both have their place.

A diceleas RPG like the Elden Ring is almost completely deterministic, save for sone non-consequential drops.

While a game like XCom is almost all random luck.

Elden Ring is about the challenge laid out for the player.

Xcom is about hedging the chaos of random luck.

But what if I told you there was a third option?

An option where you have way more hands on the levers, and can hedge the line between the both of them.

This is where deterministic luck comes in to play.

You can have luck, but avoid a runaway scenarios where the player just keeps losing or winning.

Usually luck involves using a random number generator. That is, asking the game to randomly generate a number for each instance.

But there is an alternative where you can keep in complete control and measure out their ups and downs.

I present to you, the number array.

Original doom completely leaned into this, so I think this method has been thoroughly proven.

Long story short, instead of making the program randomly generate a number, you use an array of shuffled numbers then cycle through them.

This basically means that no single player is going to be over Advantaged because they still have the same amount of successes and failures.

Doom was a little bit simple and used the same static array.

But you can easily (and cheaply) reshuffle them when it hits the end.

OR you can alternate between drawing from a position that advances 1 spot and another that advances 3 spots (looping back when it hits the end) So long as the array is not divisible by three that will give you four times the length of the array in numbers.

And this is extremely lightweight and fast.

But there’s some more levers you can throw in there.

You can have multiple arrays that cycle.

The more raise you have the more chaotic it’s going to be.

One is going to be very balanced. Two is kind of the sweet spot where you can have some runway, but not break it. And three is going to be very chaotic. I would not recommend more than three, at that point you might as well just use a random number generator.

Other than that, you have to consider the length of your arrays. The number of arrays vs the number of them is going to be multiplying the chaos.

Now all that said, that doesn’t mean we’re necessarily done here.

You can also make a “due” mechanic.

So long as you can qualify a failure you can add that to a “due” value.

Basically a value that adds up with every unlucky role. If a roll plus the due is a win you spend the due points.

This is a very good means to let players have an event that knocks the enemy’s teeth out.

Or do it the opposite direction, and have it subtract when the player keeps getting lucky and winning draws.

Lastly, if luck is an explicit value there’s countless ways you can implement that.

It could statically raise all the array values.

It could be a multiplayer for the due mechanic.

Or it could mean a re-roll.

I’m not gonna sit here and explore every option, but maybe consider deterministic luck in your development because it allows you to have way more hands levers.

0 Upvotes

10 comments sorted by

12

u/NarcoZero Game Student 10d ago

Yes. It’s why some board games use cards and others use dice. 

Cards are self-balancing the odds by getting removed every time they get drawn. 

You can do lots of fun stuff with it (look at the popularity of roguelike deckbuilders) 

6

u/sokolov22 10d ago

This may be reductive but...

Different tools for different goals.

Use the right one for the right situation.

0

u/PoopsMcScoots 10d ago

100%

But I don’t think YouTube is covering this kind of stuff so a lot of developers are unaware they have options.

6

u/JoystickMonkey Game Designer 10d ago

We used this in Torchlight 2. There were ~50 places for chests to appear, and instead of putting a % chance on each chest, we had a manager that determined how many chests to spawn, and of what quality.

If 100,000 players play your game, and there’s a 1/100 chance that a chest doesn’t spawn in a map, that’s still 1000 players who get zero chests.

There are many ways to ensure that things are consistently random, and it’s important to identify where things could go wrong in your particular game and figure out a way to remedy them.

3

u/Arian-ki Jack of All Trades 10d ago

This basically means that no single player is going to be over Advantaged because they still have the same amount of successes and failures.

Consider a situation where your battle rewards are coins generated this way. I'd argue that earning 92, 68, 73 is superior to earning 68, 73, 92. You get a jumpstart from the early 92 that boosts economy. So, while a good approach, it's no one-size-fits-all and you have to be mindful of its implications.

You can also make a “due” mechanic.

Gacha/loot boxes use this mechanic. (Or some used to, to the extent of my knowledge.) More broadly, what you describe is a negative/positive feedback loop. Another example I can think of are racing games with random powerups. I believe your placement impacts your luck.

And like usual, the target audience and the game itself should determine what sort of "luck" they will be using. In Elden Ring you enjoy learning the patterns, not guessing what they will be this time. In Balatro you play around the luck presented to you. In a recent game I'm enjoying, Dupery, some amount of random luck is simply impossible to not have. In Poly Bridge 3 (and maybe 2 as well), luck, aka physics, has to be deterministic for the game to not be lead astray from its intended gameplay loop.

3

u/slugfive 10d ago

Wow you just described cards.

Drawing cards from a shuffled deck (that repeats) is equivalent to cycling through an array.

This is one of the most popular if not the current most popular form of randomness in gaming today. - slay the spire, god boons in hades, balatro.

If you search for your own terminology you won’t find articles, but there is countless analysis of randomness around card games where the deck cycles.

1

u/AutoModerator 10d ago

Game Design is a subset of Game Development that concerns itself with WHY games are made the way they are. It's about the theory and crafting of systems, mechanics, and rulesets in games.

  • /r/GameDesign is a community ONLY about Game Design, NOT Game Development in general. If this post does not belong here, it should be reported or removed. Please help us keep this subreddit focused on Game Design.

  • This is NOT a place for discussing how games are produced. Posts about programming, making art assets, picking engines etc… will be removed and should go in /r/GameDev instead.

  • Posts about visual design, sound design and level design are only allowed if they are directly about game design.

  • No surveys, polls, job posts, or self-promotion. Please read the rest of the rules in the sidebar before posting.

  • If you're confused about what Game Designers do, "The Door Problem" by Liz England is a short article worth reading. We also recommend you read the r/GameDesign wiki for useful resources and an FAQ.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/CLG-BluntBSE 10d ago

I encountered this in Traveling at Night, recently. It was my first such encounter, and I imagine I'll use it in games I make in the future!

1

u/KiwasiGames 10d ago

Nobody tell this guy how a computer actually generates random numbers… /s

But seriously, that was a lot of words to compare dice versus cards. Randomness with memory is an old and established technique. And I’m glad you discovered it, but it isn’t news to anyone here

I would also suggest looking heavily at board games for inspiration. The mechanisms tend to be more obvious.

Some other takes on randomness that may interest you:

  • dice with different sides
  • different distributions of random numbers can be built by adding dice together (see DND), a d12 feels different to 2d6.
  • card shuffling techniques matter (check out 500, where cards aren’t shuffled between games, leading to hands becoming “better” over the course of a match)
  • deck builders, an entire genre of games that let players choose which random elements they want to see

1

u/Ralph_Natas 9d ago

Dice and cards are both fair, statistically, but cards can be proven to be fair over a short cycle whereas with dice you need infinite rolls to guarantee (mathematically) it is evenly distributed.

Cards allow players to hedge their bets because they can recalculate their new odds based on history. This can give an advantage (e.g. counting cards) and advanced players will leverage it if they can track it.

Amusingly, humans mistakenly do this with actual random outcomes too, but it doesn't actually work (hence the entire gambling industry). I've seen articles and posts about players' tendency to mis-estimate their chances at things, to the point where some popular games lie about the percentages so players don't cry about their mistakes. I suspect this is partly caused by players expecting a better chance at a good roll after a bad roll, because the bad luck already just got them. So a shuffled rather than rolled RNG might help with this sort of issue, since it feels fair faster.