I’ve released my second Unreal Engine Marketplace product.
This one is a configurable randomisation system, written entirely in Blueprints.
It allows random sequences of either numbers (e.g. die rolls) or outcomes (e.g. chance to hit) to be generated, with options to coax the results into fairer distributions and to limit unlikely edge cases.
We’ve all played games where some randomised result feels really unfair because it seems to keep rolling against us repeatedly. Since the outcome of each roll is not affected by previous rolls, it’s perfectly possible (though unlikely) to get any number of low-probability results in a row, and given enough attempts and enough players, such a sequence is almost guaranteed to happen to someone.
So, I created this system to allow designers to control the randomness, to make it slightly less random but also closer to what we as humans expect random outcomes to be like, based on some of the tricks I’ve read about other game developers using.
It uses a two main methods to achieve this effect:
The first method is the use of a shuffle bag – instead of rolling for each outcome as needed, a number of future outcomes are placed into a bag and their order is randomized.
For example, given a 20% chance, two successes and eight failures are placed into the bag, guaranteeing an exact 20% outcome over ten rolls.
This actually changes the nature of the what is being randomised – the individual outcomes are no longer random, but instead the order of the outcomes is randomised.
The second method uses random generation, but adjusts the chances to favour some outcomes and disfavour or disallow others (such as excessively long streaks.)
For example, when rolling six-sided dice, each number can become more likely to be rolled the more rolls it has gone without appearing.
The system has a lot of options to further configure the randomisation algorithm. The full documentation is available on Google docs.
These tricks can be used for things like making sure the player doesn’t go too long without scoring a hit or a critical strike, to make sure that a weapon which deals damage in a range has an even spread inside that range, or to make it increasingly unlikely for a player to go without finding rare treasure with a very low chance to drop, to name but a few examples.