Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 5572

8-bit acorn software: other • Re: PRNG's

$
0
0
I think it's generally a bad idea to do non-linear operations on shift registers if you want to maintain cycle length. Mixed mode arithmetic (e.g. XOR and ADC) is going to give non-linear behaviour and give greatly reduced cycle lengths for some seeds.
It probably is a bad idea but I was just trying to see how small it could be made
The original prng used in ladybug was 20 bytes and gave a length of 65535
This one is 16 bytes and the longest length is 63836 which is only 2.6% shorter than the original but still good enough for most games
I'll still try and make a smaller (faster) prng and see how well it performs

Its just for fun :D

Statistics: Posted by lovebug — Wed Dec 24, 2025 10:28 pm



Viewing all articles
Browse latest Browse all 5572

Trending Articles