Description
Changelog
Reviews (0)
This is useful for things such as roguelite run seeds, where you want to ensure results are exactly the same regardless of what hardware a player has.
Features
next()method can be used to return a random 32 bit integergaussian(mean, stddev)method can be used to instead return a random number along a gaussian normal curve- Because of the limitations of working with integers, this is not perfect, see the notes at the bottom.
- Written in C++ as a GDExtension addon
- Can be accessed by GDScript, C#, and any language Godot supports
Limitations of Gaussian Method
Only integer math is used to ensure deterministic outcomes across all platforms. As a result, values are rounded towards the mean. This means that if you provide a low standard deviation, the real stddev of the generated numbers will be smaller (e.g. given stddev = 2, results will really have a stddev of ~1.6). A workaround for this is to multiply all of your numbers by some factor of 10, because the larger the numbers are, the less significant this rounding is.
Changelog for version PCG Random Number Generator 1.0.0
No changelog provided for this version.