It is very simple to write a function
that will ~hopefully~ keep things more random.
function myRandom(someNumber)
rantomize timer()
trueRandomNumber = rnd(someNumber)
endfunction trueRandomNumber
In some of my code I truely abuse the RND() function.
As such I was seeing patterns ( I might have been high )
if I only called "RANDOMIZE" once at the begining of my code.
When I substituted the above snippet for the RND() function,
either I had sobered up, or it was more random than before.
Furthermore I notice zero decrease in FPS.
I suppose depending on your code, the actual underlying features
of the "RANDOMIZE" command, the interval with which you call
your new "myRandom" function, you may ultimately see a pattern,
or have a decrease in Frame Rate.
If such were true you might optionally call "randomize timer()"
and the begining or end of your "heartbeat" loop. This would
call the command the exact same number of times that your
current/real FPS is functioning at.
If you were still seeing a decrease in functionality of your
application, compared to calling it once at the begining of the
application, you could modify it in such a way to be conditional.
Such as:
deltatimer = 2000
if timer() > lasttimer+deltatimer then randomize timer() : lasttimer = timer()
Which in the above example would only execute the "RANDOMIZE"
command every 2 seconds. You can simple adjust <deltatimer>
to your needs. <deltatimer> is ( ofcourse ) in miliseconds.
No one should argue relying on "RND()" alone, is ill-advised.
You will likely see patterns repeat on every execution of your
application. And personally IMHO so is the use of
"randomize timer()" if it is only called once.
But that is just my opinion and my two cents...
for Opinion = 1 to infinteOpinions()
takeGrainOfSalt(1)
next Opinion
============ : Windows 200 SP4+, 3.2GHz Hyperthreaded
-Dejunai ............: 2GB RAM, nVidia 6600 256MB AGP 8x
============ : AC'97 basic A-Bit Motherboard Audio ( drivers always Maintained )