Log In  

Cart #sw_and_hw_rng-1 | 2021-12-12 | Code ▽ | Embed ▽ | No License

This is a re-implementation of PICO-8's own pseudo-random number generator state algorithm.

Press any button to tick the software RNG, and the hardware RNG as well. The text will turn red if the software RNG state doesn't match the 64-bit RNG state within the base RAM layout.

P#102467 2021-12-12 15:26 ( Edited 2021-12-12 15:56)

I want a piece of this, @StinkerB06.

Cart #rodetorefe-0 | 2021-12-13 | Code ▽ | Embed ▽ | No License

Here is a random number generator I made sometime back. It works pretty well I think. It's small code too without using shifting of bits, just modulos based upon a number shifting initially from minutes and seconds of running and then using its results as the new seed.

Run it. Press LEFT and RIGHT to decrease and increase the initial value by 1. In order for this to work correctly though you must have a REAL floating point number, in this case decimal one works nicely.

Clearly something is getting scrambled in the conversion but that spells good news for me as it makes quite the unpredictable random number generator.

I am curious about your code though. Where does it turn red showing it's not following the norm ?

P#102530 2021-12-13 02:46 ( Edited 2021-12-13 04:42)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 12:54:03 | 0.016s | Q:24