Skip to main content
fixed typo, added extra info
Source Link
Pikalek
  • 13.4k
  • 5
  • 49
  • 54

Most games and applications solve this problem by using a pseudorandom number generator (PRNG). With a PRNG, your initial, sharable seed value is used to generate a sequence of numbers whose properties approximate the properties of sequences of random numbers which are then used as needed to generate your content and determine the outcomes of random events.

So using your example, one would not be able to deduce where the Troll King's heart is by force-feeding a peasant some fairy fruit and watching the reaction because each fairy fruit, as well as the location of the heart would be determined by a different random number.

It's a little bit more work if you want the outcomes of events to be independent of order. For instance, if you want a system in which fairy fruit has only a single outcome for a seed regardless of when or how often it is consumed, but that probably justifies its own post.

Most games and applications solve this problem by using a pseudorandom number generator (PRNG). With a PRNG, your initial, sharable seed value is used to generate a sequence of numbers whose properties approximate the properties of sequences of random numbers which are then used as needed to generate your content and determine the outcomes of random events.

Most games and applications solve this problem by using a pseudorandom number generator (PRNG). With a PRNG, your initial, sharable seed value is used to generate a sequence of numbers whose properties approximate the properties of sequences of random numbers which are then used as needed to generate your content and determine the outcomes of random events.

So using your example, one would not be able to deduce where the Troll King's heart is by force-feeding a peasant some fairy fruit and watching the reaction because each fairy fruit, as well as the location of the heart would be determined by a different random number.

It's a little bit more work if you want the outcomes of events to be independent of order. For instance, if you want a system in which fairy fruit has only a single outcome for a seed regardless of when or how often it is consumed, but that probably justifies its own post.

Source Link
Pikalek
  • 13.4k
  • 5
  • 49
  • 54

Most games and applications solve this problem by using a pseudorandom number generator (PRNG). With a PRNG, your initial, sharable seed value is used to generate a sequence of numbers whose properties approximate the properties of sequences of random numbers which are then used as needed to generate your content and determine the outcomes of random events.