The Stack Overflow podcast is back! Listen to an interview with our new CEO.
2 Typo.
source | link

You can solve it the same way Tetris does, by making a preset list of damage results and shuffling.

Let's say you know the player is going to deal 0.8x to 1.2x damage with a linear distribution. Take the list [0.8, 0.9, 1.0, 1.1, 1.2]. Shuffle it randomly, so you get e.g. [1.2, 1.0, 0.8, 0.9, 1.1].

The first time the player deals damage, they deal 1.2x. Then 1x. Then, etc, to 1.1x. Only when the array is empty should you generate and shuffle a new array.

In practice, you'll probably want do this to 4+ arrays at once (e.g. start with [0.8,0.8,0.8,0.8,0.9,0.9,0.9,0.9,...]). Otherwise the period of the sequence is low enough that players can figure out whether their next hit is "good" or not. (Although that can also add more strategy to the combat, as in Dragon Quest IX's HoemiHoimi table, which people figured out how to probe by looking at healing numbers and tweak until you're guaranteed a rare drop.)

You can solve it the same way Tetris does, by making a preset list of damage results and shuffling.

Let's say you know the player is going to deal 0.8x to 1.2x damage with a linear distribution. Take the list [0.8, 0.9, 1.0, 1.1, 1.2]. Shuffle it randomly, so you get e.g. [1.2, 1.0, 0.8, 0.9, 1.1].

The first time the player deals damage, they deal 1.2x. Then 1x. Then, etc, to 1.1x. Only when the array is empty should you generate and shuffle a new array.

In practice, you'll probably want do this to 4+ arrays at once (e.g. start with [0.8,0.8,0.8,0.8,0.9,0.9,0.9,0.9,...]). Otherwise the period of the sequence is low enough that players can figure out whether their next hit is "good" or not. (Although that can also add more strategy to the combat, as in Dragon Quest IX's Hoemi table, which people figured out how to probe by looking at healing numbers and tweak until you're guaranteed a rare drop.)

You can solve it the same way Tetris does, by making a preset list of damage results and shuffling.

Let's say you know the player is going to deal 0.8x to 1.2x damage with a linear distribution. Take the list [0.8, 0.9, 1.0, 1.1, 1.2]. Shuffle it randomly, so you get e.g. [1.2, 1.0, 0.8, 0.9, 1.1].

The first time the player deals damage, they deal 1.2x. Then 1x. Then, etc, to 1.1x. Only when the array is empty should you generate and shuffle a new array.

In practice, you'll probably want do this to 4+ arrays at once (e.g. start with [0.8,0.8,0.8,0.8,0.9,0.9,0.9,0.9,...]). Otherwise the period of the sequence is low enough that players can figure out whether their next hit is "good" or not. (Although that can also add more strategy to the combat, as in Dragon Quest IX's Hoimi table, which people figured out how to probe by looking at healing numbers and tweak until you're guaranteed a rare drop.)

1
source | link

You can solve it the same way Tetris does, by making a preset list of damage results and shuffling.

Let's say you know the player is going to deal 0.8x to 1.2x damage with a linear distribution. Take the list [0.8, 0.9, 1.0, 1.1, 1.2]. Shuffle it randomly, so you get e.g. [1.2, 1.0, 0.8, 0.9, 1.1].

The first time the player deals damage, they deal 1.2x. Then 1x. Then, etc, to 1.1x. Only when the array is empty should you generate and shuffle a new array.

In practice, you'll probably want do this to 4+ arrays at once (e.g. start with [0.8,0.8,0.8,0.8,0.9,0.9,0.9,0.9,...]). Otherwise the period of the sequence is low enough that players can figure out whether their next hit is "good" or not. (Although that can also add more strategy to the combat, as in Dragon Quest IX's Hoemi table, which people figured out how to probe by looking at healing numbers and tweak until you're guaranteed a rare drop.)