I've come across a problem I can't figure out. I need to be able to get both 3ds systems to use the same random number sets from RND(). It's been a quite few months since I've worked on this problem, so I can't remember everything I tried. Here is a simple tile tapping game I was working on a months ago: K3P5X4D. It's setup so that the tile patterns are random for each player. Both players are supposed to see the other players progress in clearing the tiles, but it doesn't work right because the random numbers are not the same for both systems. The game does work. It can tell who finished first or second... just the visuals don't work as intended.
Solving this problem will help the other multiplayer games I'm making.
Ideas?
Controlling Number Randomization
ahavasandwichCreated:
RANDOMIZE 0,seedCould you give a brief explanation of that command? I'm not sure how to use it.
...hmm. Thanks. I'll tinker with this tonight.
Because I have the Japanese version of Smilebasic and I don't read Japanese, I didn't know how to use randomize() properly and thought it didn't work, so I ported a simple RNG - the Mersenne Twister - to SB: http://smilebasicsource.com/page?pid=95
It works well, but is a lot slower than the built-in rnd() function.
I thought of trying something like that (more like a really vague idea in my head), but it seemed like a lot of work. Really cool idea though. I didn't really know about this algorithm until now or how widespread the use of the Mersenne Twister is.
I did end up getting RANDOMIZE to work with two systems. I just set it to: RANDOMIZE 1,1. It did the trick just fine.