objects over network

BlitzMax Forums/BlitzMax Programming/objects over network

Eikon(Posted 2005) [#1]
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.


FlameDuck(Posted 2005) [#2]
Is BMax's random generator consistent?
No - it's FPU dependant.


Will(Posted 2005) [#3]
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?


Dreamora(Posted 2005) [#4]
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.


tonyg(Posted 2005) [#5]
You can use this...
Mersenne Twist
from here


Will(Posted 2005) [#6]
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.


Tibit(Posted 2005) [#7]
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!