> Are you saying that you would just send the xy
> coordinates and that would be iterpretted by the
> server or peer? I'm not sure how you will solve the
> synchronization problem.
Yes, only the xy mouse coordinates.
The reason I'm asking is because I was playing a game
called winbolo (aka bolo for mac users). Every so often
a message appears on the screen "Network failed - resyncing".
The keyboard and mouse are disabled until the network problem
goes away. However, warcraft2 didn't have this problem.
I'm wondering what techniques they used in warcraft2 data
transfer.
> I'm wondering what techniques they used in warcraft2
> data transfer.
One way I think you could manage the synchronization is if the image is coming from the server you could label the frames as the data is sent down and associate the mouse coordinates with the frame number. But that whole concept seems a little wonky to me.
My guess is that either the sprites report to the server what they are doing or the commands that the user is giving are reported to the server.
I would think it would at least have to say:
peon at location x, y then mouse click to move to location x',y'.
I'm not sure about the path finding algorithm they use, but if it used any randomization it wouldn't work.Then you have to consider the opposite side, getting the location of the enemy units. Does the server send mouse commands to the client saying:
enemy at location x,y then mouse click to move to location x',y'
I'm kind of assuming that as long as the current location is passed with the mouse click, then the path would match on everyone's screen.
Yes, you're right. I wasn't being thorough, just speaking generally.
Probably, warcraft sends the actions you invoke. Such as unit orders, build orders, etc. Of course, it would need to communicate some sort of global coordinates for most actions. And it would also need to communicate a time, which can be done in numerous ways.
If there's any randomization than the results of that randomization must be communicated too. I doubt there's any for pathfinding though. But for stuff like units hitting eachother, someone has to decide who hits what for how much damage and at which time and communicate that.