[Request] Random Number Generator

0 favourites
  • 13 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • http://davidbau.com/archives/2010/01/30 ... .html#more

    I need someone to add the above RNG to Construct 2.

    It's already in JS.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You might see this.

  • I would like an updated version of the above. He's made improvements upon the implementation: [quote:1c871dbq]

    Update 11/10/2013: I am getting ready to release a version 2.3 (same random sequence) designed to be slightly friendlier to use in node.js, and I got a chance to test the PRNG quality using the dieharder random number test suite, which collects billions of outputs and tests for non-random patterns. To provide input data to dieharder, I just called seedrandom from node.js and tested the output stream of 32-bit numbers generated by Math.floor(Math.random() * 4294967296).

    Here is the dieharder analysis of the sequence starting with Math.seedrandom(1). Note that the "WEAK" asessment is given for tests that result in a p that is near zero or near one, but because more than a hundred tests were run, we expect occasional tests to come in big or small - indeed if no tests were reported "WEAK", it would be an indication of a problem. Overall, the performance of this little javascript PRNG is pretty robust.

    Update 1/1/2014: seedrandom is now available as a package in npm and bower. The current version number is 2.3.1.

  • I don't think randomplus works anymore, it only appears to have one action.

    Can someone please add the RC4 random number generator that I specified? Shouldn't be too difficult. I don't understand the SDK myself.

  • RandomPlus is your best shot.

    Why would you expect more than one action ? A random generator with seed is nothing more than one action.

    Ok, RandomPlus is not the same algorithm, but from the moment it gives you back the same "random" number when you use the same seed, that's all you need, don't you ?

    In the absolute, it's just mathematic, you don't even need a third-part plugin and could implement it yourself in events.

  • okay, then, I can't figure out how to seed the random number generator, the action does not say "seed," it says set count to n, the randomplus object properties are few (I guess I don't specify a seed in the layout tab?)

    i don't know what randomplus.count or randomplus.pickedcount or randomplus.randplus does

    and yes, but I don't trust my programming skill sufficiently to avoid breaking everything in subtle ways

    and rc4 is slightly better then mersenne primes

  • Thank you, and to reinforce my point on random plus: http://imgur.com/94GJkaa the example capx only contains two events and it's not clear what those two events precisely do

  • I amend my previous statement.

    rex_randomgen doesn't work: http://imgur.com/wDhMuQd

  • The RandomPlus thread contains posts that explain how the plugin is supposed to work/be used.

    The first post explains that the plugin gives pretty much a modification of the random() expression.

    This system expression expects a range (a minimum number and a maximum).

    The action "RandPlus" adds a seed to it.

    Just go through the two pages of the thread, it's explained.

    Moreover, you can check the inline help for the plugin (from within Construct2 itself) to see what values are expected in what field. Like for any other plugin.

    .count and .pickedcount are common expressions to all plugins.

    As for Rex's generator, you first have to use the Seed() action to set your seed, and then get the random() expression using that seed.

  • no RandomPlus thread does not contain such posts

    at least posts that I can comprehend, although I do see questions

    but thank you, I think I'll use Rex's generator.

    [quote:3laklx31]Moreover, you can check the inline help for the plugin (from within Construct2 itself) to see what values are expected in what field. Like for any other plugin.

    ????No it doesn't. http://imgur.com/Uqjk8MX

    If it is explained, I certainly don't understand it. That's all I can say.

  • ryackov

    My random generator uses the same algorithm with cow_trix's.

  • ...Thank you?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)