2009-06-10, 10:58 PM
The server already monitors login time (as generally evidenced by the Family Pedigree window). The simplest time to use would be to have the traditional UNIX timestamp used for srand() as most programs in C do anyway. The server monitors (and synchronizes) the randomization between the client and server. If the client is desynced from the server, then the server disconnects the client.
I had originally hoped that Maplestory would use something other than the C-standard rand() function as it's not a very good function (several calls to the rand() function in the same second produces the same stream of bytes). The Mersenne Twister would be a much more suitable option and is commonly available in C++ Boost libraries. Hell, even using AES as a PRNG works too, and Maplestory utilizes this encryption standard everywhere anyway. Why not?
I had originally hoped that Maplestory would use something other than the C-standard rand() function as it's not a very good function (several calls to the rand() function in the same second produces the same stream of bytes). The Mersenne Twister would be a much more suitable option and is commonly available in C++ Boost libraries. Hell, even using AES as a PRNG works too, and Maplestory utilizes this encryption standard everywhere anyway. Why not?
