I’m generating a 2d map that I need to be the same on the client and the server. I expected using a seed would cause deterministic results across clients but it doesn’t. Currently the results are deterministic in the sense that the server always generates the same number, and the client always generates the same number, but the server and the clients number are always different.
Should probably just have the server make the random number and replicate it back to clients. The seed may be deterministic insofar as it limits the range for the random number, but it is stll random. Even if you could trick them into agreeing, the server should be the one with authority.
The issue is the pure cast for anyone running into this. Getting gamestate or something like that will always be a pure cast. You have to retrieve the int, reset random stream, and then it will replicate