ShaiRandom 0.0.2-debug

ShaiRandom

That which is ordained.

Welcome to the homepage for ShaiRandom, a random number generator library for modern .NET platforms.

What Is It?

ShaiRandom provides high-performance non-cryptographic pseudo-random number generators for simulation, game development, or any other purposes. It also has statistical distributions and various kinds of utility code relating to random numbers, including a weighted probability table and special generators for testing that can record or reproduce a given sequence. Unary hashes are also provided in the Mixers class, which can be useful to supplant random number generators in some cases commonly encountered in game development.

It really is high-performance! Benchmarking has been done at most stages of the project on the generators (though not the distributions), and they generally outperform System.Random regardless of whether it uses the optimizations in .NET 6 or not.

Serialization is a major priority for ShaiRandom; all pseudo-random number generators can be serialized to a short string and later deserialized from that string. This includes generators that have been wrapped (with a wrapper) to alter their behavior. Serializer.Serialize() and Serializer.Deserialize() are most of what you need here.

Obtaining It

See ShaiRandom on NuGet for more.

Licensing

ShaiRandom

This project is licensed under the MIT License - see the LICENSE.md file for details.

Other Licenses

Licenses for other projects which ShaiRandom depends on or from which inspiration was taken are listed in the credits section.

Credits

ShaiRandom depends on some other .NET Standard libraries for some of its functionality. Those projects and their licenses are listed below.

jdkgdxds

This Java data structure library (by the same author as this library) has the same general structure for its random number generators and uses the same algorithms. It is licensed under Apache 2, but permission from all contributors (or the only contributor, me) to the random number generators allows that code to be freely relicensed as MIT here.

GoRogue

GoRogue was used as an optimal project structure for a .NET library targeting modern versions, and ShaiRandom is meant to be usable by GoRogue. Significant amounts of code have been exchanged back and forth to avoid duplication between ShaiRandom and GoRogue, and it is safe to say they follow similar philosophies. GoRogue's author, Chris3606, is a major contributor to this library. GoRogue is also licensed under MIT:

Troschuetz.Random

ShaiRandom's optional TroschuetzCompat library depends on Troschuetz.Random to help bridge compatibility between that now-archived library and this one. Troschuetz.Random is also licensed under MIT:

Showing the top 20 packages that depend on ShaiRandom.

Packages Downloads
GoRogue
Roguelike/2D game utility library.
18
GoRogue
Roguelike/2D game utility library.
19
GoRogue
Roguelike/2D game utility library.
23
GoRogue
Roguelike/2D game utility library.
24
GoRogue
Roguelike/2D game utility library.
25
GoRogue
Roguelike/2D game utility library.
26
GoRogue
Roguelike/2D game utility library.
27
GoRogue
Roguelike/2D game utility library.
28
GoRogue
Roguelike/2D game utility library.
29
GoRogue
Roguelike/2D game utility library.
30
GoRogue
Roguelike/2D game utility library.
32

Stable Release

.NET Core 3.1

.NET 5.0

.NET 6.0

.NET Standard 2.1

Version Downloads Last updated
0.0.2 32 02/06/2024
0.0.2-debug 25 02/06/2024
0.0.1 38 02/06/2024
0.0.1-debug 41 02/06/2024
0.0.1-beta03-debug 29 02/06/2024
0.0.1-beta03 32 02/06/2024
0.0.1-beta02-debug 28 02/06/2024
0.0.1-beta02 34 02/06/2024
0.0.1-beta01-debug 19 02/06/2024
0.0.1-beta01 33 02/06/2024
0.0.1-alpha05-debug 26 02/06/2024
0.0.1-alpha05 29 02/06/2024
0.0.1-alpha04-debug 31 02/06/2024
0.0.1-alpha04 24 02/06/2024
0.0.1-alpha03-debug 35 02/06/2024
0.0.1-alpha03 27 02/06/2024
0.0.1-alpha02-debug 32 02/06/2024
0.0.1-alpha02 29 02/06/2024
0.0.1-alpha01-debug 35 02/06/2024
0.0.1-alpha01 27 02/06/2024