[PLUGIN] Seeded Pseudo Random Number Generator

0 favourites
  • 1 posts
From the Asset Store
104 sounds of futuristic interfaces working for activations, deactivations, buttons, devices, generators, launches, etc.
  • I know theres already a few of these around, but one costs money and the other has dead links.

    So i figured it'd be a nice simple introduction for me to the JavaScript SDK. (read: first plugin, be nice )

    Basically, this is an expression only plugin that will take a single input ( the "Seed") and generate a Psuedo Random Number based on that seed.

    You can then use that PRN just like you'd use the built in Random expression. But this time it'll always be the same, no matter how many times you generate it!

    See it in action here

    I've tested it a bit, but I'd love to have the community have a play before I move it to completed. Also, any features you'd like added, comment below!

    ---

    ALL DOWNLOADS INCLUDE EXAMPLE CAPX SHOWING USAGE.

    ---

    V.1.0.0 - 14/09/17 - DOWNLOAD

      Initial release Two Expressions: - Int: returns a whole number between 0 and 2147483647 based on the seed - Float: returns a float between 0 and 1 based on the seed.

    NOTE: Not 100% Random in its spread, tends towards 1 & 0. Hence the Pseudo Random name. If you want a 100% Random, proper Entropy, correct spread... ask and I might implement it. It wont be as fast though.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)