RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    How to get true RNG?

    Scheduled Pinned Locked Moved Help and Support
    emulationrandomized
    3 Posts 3 Posters 440 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • AddisonA
      Addison
      last edited by Addison

      Hi.

      Many of the retro titles I enjoy are word games.

      The starting letters should all be random, but I tend to constantly receive the same patterns on these.

      That RNG is probably also true with other games as well.

      Is there anything that can be done to completely change this baseline with them?

      Hope that I'm making some sense.

      Cheers. :)

      Thorr69T 1 Reply Last reply Reply Quote 0
      • Thorr69T
        Thorr69 @Addison
        last edited by

        @Addison RNG generators are usually seeded by the system time. Since the Pi doesn't have a clock, it's likely that your RNG is being seeded by 0 every time and that's why you see the same thing over and over.

        RPi 3b
        Official PSU
        Official RetroPie image
        Pandora's Box 5 controller

        1 Reply Last reply Reply Quote 1
        • mituM
          mitu Global Moderator
          last edited by mitu

          If we're talking about emulated games, the date/time of the emulator may not have an influence on the RNG the game implements - most of the emulated systems didn't have a real time clock or the concept of the system date/time.

          @Addison it all depends on how the game implemented the RNG, some of the games relied on the RAM contents to initialize the RNG. On an emulator, the emulated RAM may get initialized to the same value (zero for instance) and thus there's no RNG at stake. Some emulators cater for this kind of situation with options - for instance Snes9x has a Randomize Memory option for this kind of situations, others may initialize the RAM directly with random values to prevent RNG failures.

          Funny enough, some games' RNG can be manipulated, a technique used in speedruns to get a predictable set of events/weapons/etc. An example is below, where the runner saves and resets the game during startup

          1 Reply Last reply Reply Quote 2
          • First post
            Last post

          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.