At 20:24 26-8-00 +0200, you wrote:
>At 19:46 26-8-00 +0200, you wrote:
>>I've been working on a game for some time now (Bomberman, MAYBE FutureDisk
>>will show a demo of it on the Bussum-fair) but I'm having some troubles with
>>generating random numbers. I'm now using the refresh register which I add to
>>the previous offset in a look-up table, but it isn't random enough for me.
>>And the math-pack is too slow to be of any use. Does somebody have a fast
>>algorythm/code (assembly) for me?
>
>I thought the refresh register itself is a pretty good randomizer. It 
>should be a very good randomizer when you are getting two numbers and do 
>something like an xor on it like this:
>
>ld a,r
>ld b,a
>ld a,r
>xor b

ld a,r
ld b,a
ld a,r
xor b
ld b,a
ld a,r
xor b

is a better way to randomize and repeating this more should improve it.


GreeTz, BiFi

Visit my Home Page at www.bifi.msxnet.org
mail me at: [EMAIL PROTECTED]
FTP: ftp.bifi.msxnet.org
ICQ #36126979

****
Problems? contact [EMAIL PROTECTED] See also http://www.faq.msxnet.org/
****

Reply via email to