In my game I'm going to use random values to pick the reward the player gets from a chest. The problem is that you can quick save and quick load and that means they can keep reloading to re-randomize until they get what they want. Is there some way that I could get the current seed value of my Random
object and possibly return to that same point when they load so that they couldn't abuse the randomization?
Not sure on getting the seed, but you could save the value you give to the Random
object. Remember, there are two constructors. The second is Random(Int32)
, so if you set the seed yourself (an easy enough value is Environment.TickCount), you could store that value somewhere before you pass it to the constructor. If you haven't read it yet, check out the MSDN documentation at https://learn.microsoft.com/en-us/dotnet/api/system.random.