I'm reading over the Wiki and implementing the various block generation systems for my clone. I'm pretty sure that TGM3 just uses TGM2's generator, but I wanted to check in here for confirmation. Thanks guys.
Thanks kotetsu. I currently have these generators implemented. While I'm working on this, are there any others that you guys would like to see? Completely Random TGM1 TGM2 CustomTGM - You can specify number of tries and initial history Tetris Guidelines TGMAce - Guidelines Generator with first block = {L, J, T, I} N-Bag Generator - works for any value > 0 Behaved Bag Generator - N-Bag Generator with first block = {L, J, T I} Anything else out there? Give me your archaic generator with some specs and I'll implement it. Thanks.
the TAP randomizer use the scheme Code: SEED = (1103515245*SEED + 12345) Witch is initially suggested on book "The C programming language" by Brian W. Kernighan and Dennis M. Ritchie. you can find very interesting information on article "How Computers Generate Random Numbers" and direct source example here.
Additionally, it is suggested by some that you don't use the Mersenne Twister, because it has a considerable time increase every 25th number generated. I am not sure how correct this is, though. If you are going to have a replay system, you will need a PRNG that is repeatable. You will be adviced to not do what Doom did, though, which had a table of 256 random numbers that it uses. Certain numbers don't appear, and the distribution is notably pseudorandom.
Ah, the well-known ANSI C settings for a linear congruential generator. I'm assuming that it then does ROLL = SEED % 7. Lockjaw also uses a LCG, with the BCPL formula that, according to the LCG page, produces a better spectral test result: Code: p->seed = p->seed * 2147001325 + 715136305;