minecraft-physics
minecraft-physics
56 / 1
25th Sep 2022
30th Sep 2022
A small piece of tech for an ongoing project. This save generates one random integer per frame, but crucially, it can be seeded. If you need to replay a random sequence, you can just restore the previous RNG state..
subframe random psuedorandom prng

Comments

  • minecraft-physics
    minecraft-physics
    25th Sep 2022
    @Jerehmia cool - you definitely beat me on size and sophistication. Do you know a good reference for how to calculate the periodicity for a given suite of shifts?
  • Jerehmia
    Jerehmia
    25th Sep 2022
    Nice, this is the same the same XorShift PRNG I implemented a while ago. I used shift constants A(11, 3, 13) which result in a 2^30-1 period generator, check id:2861441
  • ivel236
    ivel236
    25th Sep 2022
    Do you mind if I use this for an RPG style thing?