Sakorona / SDVMods

A collection of mods for Stardew Valley
Other
22 stars 21 forks source link

Suggestion: Use XoshiroPRNG.Net instead of inlined Mersenne Twister code #100

Closed pepoluan closed 2 years ago

pepoluan commented 3 years ago

Several concerns, in no particular order:

In fact, here's an article (not written by me) that was also kind of negative about Mersenne Twister, and it actually (to my surprise!) recommended XoshiroPRNG.Net for .Net applications.

I am quite confident of XoshiroPRNG.Net's performance and quality, so much so that I've released a mod, "Even Better RNG", which replaces the game's RNG with XoShiRo128 (reason for choosing XoShiRo128 instead of a stronger algorithm was because it's optimized for 32-bit processing.)

If you need additional interfaces not available in XoshiroPRNG.Net but available in MersenneTwister.cs, you can point it out to me and I'll see what I can do.

Sakorona commented 3 years ago

Yeah, it is a bit of a convoluted license. (I use a NuGet implementation on another project). I'm on a bit of a Stardew Valley break for now but I'll remind myself to convert my PRNG object soon

Sakorona commented 3 years ago

Since I'm probably going to maintain the base assuming 32-bit users (for the time being), I'll likely use XoShiRo 128** in the next update, since I'm testing it on the other project atm.

Thank you for telling me about this!

Sakorona commented 2 years ago

Note to self: get this working

Sakorona commented 2 years ago

Updated! Thanks for reminding me. Will be syncing code later today.