martay

Mar 1, 2009, 10:12 PM

I'm finishing a game that starts levels off with a particular random seed so that they're repeatable all the way through. I'm trying to write the NSCoding so that the game is saved and loaded back up. The question is, what do save as a seed. I can't save the original seed because I don't (currently) keep the number of times I've asked for a number. I can get the latest random number, but I think what I really need is the last random number given out (that serves as the seed for the next number, right?).

Any suggestions? I could keep the last random number given out, but I was hoping for a more elegant solution.

Any suggestions? I could keep the last random number given out, but I was hoping for a more elegant solution.