Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Seeded Random Number Generator

    Beginners
    2
    6
    309
    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.
    • F
      faz808 F last edited by

      I thought that a random() function with a seed might my useful. Digging around the internet I found this bit of code which seems to work quite well.
      Hope it proves handy.
      Rnd_With_Seed ID: NX6RYKKD15

      1 Reply Last reply Reply Quote 1
      • F
        faz808 F last edited by

        Sorry all...
        My Random number generator is not quite as random as I first thought. Basically, it's rubbish !
        Back to the drawing board.

        1 Reply Last reply Reply Quote 0
        • pianofire
          pianofire Fuze Team last edited by

          Have a look at this: https://rosettacode.org/wiki/Linear_congruential_generator

          F 1 Reply Last reply Reply Quote 1
          • F
            faz808 F @pianofire last edited by

            @pianofire Thanks for that info. I tried your suggestion, but although they are (C code etc) better than my previous attempt the examples aren't truly random. With a plot (x,y,colour) you can see a strange diagonal pattern appearing after 200 or so plots.
            Looks like I'll wait for a Fuze update - hopefully with random(Seed, Range). A chap can dream can't he !
            Thanks again, pianofire.

            1 Reply Last reply Reply Quote 0
            • F
              faz808 F last edited by

              I might be getting somewhere.
              I didn't realize that a written file is included with the project.
              Persistant_Stars ID:CV873MND15

              1 Reply Last reply Reply Quote 1
              • F
                faz808 F last edited by

                Prettier I thought …
                clear(blue)
                for p = 1 to stars loop
                circle(xx[p], yy[p], 2, 32, white, false)
                repeat

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