How do I create Random numbers so that users of my Dream have changing experiences?
I want to be able to create random values which can be used in decision-making.
Here’s an example use case. The player enters a trigger zone which MAY cause a nearby rock to fall. Let’s say with a 20% probability. Now imagine that there’s more than one rock, each triggered by the same event.
If the 20% probability in my example is driven by choosing truly random numbers, the avalanche of rocks will vary each time through.
There are many applications of random numbers in simulations, and these are usually created in programming languages by functions such as RAND() which generate a stream of floating point numbers which typically vary between 0 and 1
Sticklers for an even more unpredictable experience (such as myself) will “seed” the random number generator with numbers from the system clock. THIS is the type of randomness I’m looking for.
I realize that the “RANDOMISER” (see screen shot) exists, however it’s really designed for outputting a limited variety of discrete results. I’m looking for finer controls, AND the ability to avoid repeatability. (Maybe RANDOMISER is re-seeded each time, so lack of repeatability may not be an issue, however its coarse granularity is an issue for me)
Thanks in advance for your ideas
-
Apparently the signal generator is capable of some passable pseudorandomness but it's a very tricky gadget to figure out. There might be something in the sound tools that can be exploited as they include randomness settings.
Off the top of my head you could always have a bunch of random 0 to 9s and divide each by a progressively greater power of 0.1, then sum them.
In LBP I believe all seeding was based on time since the level was started. -
On the same subject, does anyone know what seed is being used for Dreams randomiser? I haven't really messed around with the logic yet, but I remember it being a pain to create unique outputs in LBP due to its level-time seed.
-
Thank you both for your insight. Much appreciated!
I’d like to have ability to seed the random number generator so as to able to both create variation, AND to ensure consistency and repeatability during testing. -
I created an algorithmic 'random' number generator in LBP2 using microchips and logic that I could seed with any starter number.
The problem was proving it was random 'enough'. These games are not set up to generate long text files... -
Sorry... I'm trying to get my head around with the problem is you're trying to solve. Is it just that you want to be able to give it a seed, to reproduce the random sequence of numbers? If so, could you just set the numbers by hand for testing?
-
'@Supposer
The main objective is to be able to create numbers that are random enough such that when used to drive logical decisions and events in a game/experience, the player is unable to predict which way things are going to go simply by replaying over and over.
The secondary objective is to provide a method of ensuring that the sequence of random numbers is repeatable for testing purposes. If something goes wrong in the logic, but only in particular conditions, then it can be hard to identify the bug.
Here’s a use case for the first objective. Imagine a game where enemies spawn/appear at random intervals. If the random number generator always generates the same string of numbers, a player could learn to be highly alert at those learned times, thus eliminating the element of surprise.
And for the second objective, let’s say that a certain pattern of enemy inter-arrival times causes a problem. Let’s, for example, say that if three or more enemies arrive within a 4 second interval, then something “bad” happens (in the sense of a logic bug, or just a generally poor experience). Then it’s important (to me, the developer) to be able to reliably reproduce the situation which triggers the problem, so I can repeatably test for a fix. I don’t want to have to blindly try replaying in the hope that the condition will arise.
When testing, I want to eliminate the element of surprise! -
My Double Dice simulator appears to be nice and random - uses a button press initiator which adds an extra randomising element to the the already random numbers. If you introduce a button press into your game at the start (Press button to start) then the random numbers you get will be different every time because the player will not be able to calculate the speed of the button press to be accurate to 0.1 of a second to get the same result.
الرجاء تسجيل الدخول لترك تعليق.