You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will be really helpful in many cases (for example display tips randomly rather than in order)
My thoughts are letting random functions accept a optional seed so it always returns the same value with the same seed, and use system time (rounded to a scale like 10 seconds) so that every time when the game starts, it displays different tips rather than the same order of tips every time.
The text was updated successfully, but these errors were encountered:
generate_seed(): Generates a new (48 bit integer) seed for use in other functions. (This should be saved in constants).
random(seed): calls random_seeded(seed, 0)
random(seed, index): returns a random number (between 0 and 1) based on both the seed and index - the idea being that you'd keep the seed the same, and pass an ever-increasing index to grab the next value for that seed.
random_int(seed, index, max): returns a random integer between 0 and max-1. Internally this is just min(max - 1, random(seed, index) * max), but it's a lot easier to type this way.
This will be really helpful in many cases (for example display tips randomly rather than in order)
My thoughts are letting random functions accept a optional seed so it always returns the same value with the same seed, and use system time (rounded to a scale like 10 seconds) so that every time when the game starts, it displays different tips rather than the same order of tips every time.
The text was updated successfully, but these errors were encountered: