Implementing a Pseudorandom Number Generator with XORSHIFT32

2025-01-04

This devlog details the implementation of a pseudorandom number generator (PRNG) using the XORSHIFT32 algorithm. The author uses 1804289383 as the initial state, a number previously used in other engine implementations. The implementation is straightforward, involving bit shifts on the initial state. The code defines the initial state and includes a `getRandomNumber()` function that performs the XORSHIFT32 algorithm.

Read more