A
Alvin
Well, I'm developing a Tetris game in SDL, but when it comes to
deciding the next block, I'm stuck. It's random, but when I try
something like seeding the randomizer with the time, it won't update as
fast as one block can fall, and the next to be determined. Generating
different numbers in one spur can work, but people can play Tetris for
hours (or even days), and so you can't predict how long. You could
constantly be making more with the same system as making, say 5 random
numbers out of a seed, but that would prove system intensive if the
game already uses a lot of memory (not that Tetris does, but I'm sure
there's a better way).
deciding the next block, I'm stuck. It's random, but when I try
something like seeding the randomizer with the time, it won't update as
fast as one block can fall, and the next to be determined. Generating
different numbers in one spur can work, but people can play Tetris for
hours (or even days), and so you can't predict how long. You could
constantly be making more with the same system as making, say 5 random
numbers out of a seed, but that would prove system intensive if the
game already uses a lot of memory (not that Tetris does, but I'm sure
there's a better way).