True random function

Share your advanced PureBasic knowledge/code with the community.
SoulReaper
Enthusiast
Enthusiast
Posts: 372
Joined: Sun Apr 03, 2005 2:14 am
Location: England

Post by SoulReaper »

hi folks :)

to be honest, I dont think there is such thing as a true random number generator...

I guess what i am trying to say is that it will have repetition, even in the spectrum and amiga days, it was not perfect and that was using an interrupt counter routine with a seed and add and multply, using quick instructions.

mind you CPUs have more power now so maybe it is possible to get closer to true random numbers.

@Trond
Nice Routine :) Respect! :wink:

Regards
Kevin :wink:
Phoenix
Enthusiast
Enthusiast
Posts: 141
Joined: Sun Sep 04, 2005 2:25 am

Re: True random function

Post by Phoenix »

What do you mean by "true random"??? Is PureBasic's Random() command buggy???
SoulReaper
Enthusiast
Enthusiast
Posts: 372
Joined: Sun Apr 03, 2005 2:14 am
Location: England

Post by SoulReaper »

No its fine... :?

In the title its say True...Random

What i meant is that nothing is perfect e.g. the universe is not perfect :wink:

okay maybe Fred is Perfect and PureBasic :roll: :wink:

P.S. its random enough for us mortals :lol:

Regards
Kevin :wink:
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

Since the majority of random routines are probably used in games wouldn't it make sense to use a random number routine that uses the players position, speed or whatever they can influence in the game as part of the routine and that should probably make the game random enough.

I know random numbers are used in non-games but I would have thought that most of the time that was for testing purposes and so true randomness wasn't that important.
Post Reply