The examples have been included in the package and are imported when the Rest Server package is installed. They can be found in the package directory (usually de.bearo.generalrandom) in the subdirectory Samples.

Example Description

Neon Terrain

Simulates the random terrain generation inspired by Nightride FM YouTube channel. It simulates terrain generation by
dropping grains of sand at specific places on the terrain. If they hit a non-ground-level terrain these start rolling
“down” in random directions.

Random Image

This is a very simple demo by generating a random value for each pixel. Every pixel has a 50% probability to be black
or white.

Random Loot

A simple random loot example which allows to change the probability for each item.

Random Names

Generates random names by choosing a starting character at random and the next character depending on the probability
in the english language. Only accounts for tuples and their probabilities. A production ready model would include
more language specifics.

Roulette Buckets

Demonstrates the RouletteDistribution. Each target is a bucket and the probability of each target can be adjusted,
Spheres are then randomly distributed among the targets.

Simple Distribution

Another example for RouletteDistribution as a cheap way to generate every distribution imaginable. The distribution
doesn’t have to follow any usual constraints, but the generation is slow.

Fair Random
New in 1.2.0

Example of the Fair Random distribution which gives a subjective better experience for RPG games. It’s used for
example in critical hits or procs. The probability is steadily increased until the proc happens and then reset to
the base probability.

Rpg Dice
New in 1.2.0

Example of the Rpg Dice distribution which is inspired by the dice notation for RPG games. It allows to specify
the number of dice and the number of sides for each dice. The result is the sum of all dice rolls.