Is it possible to "synchronize" (for lack of a better word) random number generators on two different machines?
Context: I have a card game for iOS with network multiplayer. Both peers need to be able to access the card deck. When the deck gets shuffled, I can serialize my card deck object with NSCoding and ship it over to the other peer so the decks are in sync, but I could send less data if I could just count on the random number generators on both peers to generate the same random numbers.
Because this is a card game, I need the best random numbers available, so I prefer to use arc4random(), which seeds itself when first called. Is there, perhaps, a way to seed it manually?
Simply sending the card deck object is an okay solution, but I plan to implement asynchronous multiplayer using OpenFeint, and to do that, my game states need to stay under 16K, and just my card deck is almost 2K when serialized. :)
Thanks!