objects over network
BlitzMax Forums/BlitzMax Programming/objects over network
| ||
Would it be possible for the server to send a seed number to all clients, who would then SeedRnd with it, making all random monsters behave the same across all machines? Is BMax's random generator consistent? Also, how would you start a new player generating at that exact moment in time of the random number chain? If this works I would only have to worry about deleting the monsters over the network and not their positions. |
| ||
Is BMax's random generator consistent? No - it's FPU dependant. |
| ||
What is an FPU and if there is a seedrand command it probably would be consistent right? If it wasn't, what purpose would seedrand have? |
| ||
your processor (floating point unit). So it will behave different on X86 than on OSX and I think even different between Intel and AMD. No mather if you have the same seedrand. if you want a consistent, you might need to implement your own random generator. |
| ||
You can use this... Mersenne Twist from here |
| ||
wow - its a bummer that the inbuilt system doesn't behave the same across platforms. Does that mean its faster than the Mersenne Twist or Mark just didnt have time to implement a cross-platform one? Also - you could just send a nice long list of random numbers over the network and store and recall them when you need them as the game plays. Just send lots of floats between 0 and 1. With 500 of those, it wouldnt take too long to send, and you could just reuse them once youve used 500 start again - nobody would notice, and its freaking unlikely it would behave the same as while the same random results would be used, it would probably be for different purposes each time. I think I am going to take that approach. |
| ||
I would not recommend you to send floats because you won't have exact precition. In my experience if you want to send seeds try to make them ints. And I don't understand why Merenne's Twist is not a BlitzMax standard? Have anyone told BlitzResearch? Because it is gold to be able to recreate reliable random seeds! |