Another Sync discussion

Another Sync discussion

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Another Sync discussion

Post by PauloMorfeo »

Would it be possible (and easy) to modify the engine so it doesn't runs syncronized anymore but, instead, have the simulation run on a server with the other computers acting as clients?

That would solve the issues with Windows/Mac/Linux platforms playing together, right?

Of course that would allow cheating but it would be entirely dependant on the server, only. I remember that in the lobby, there were a server with an automatic bot for matchmaking.
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

But that would completly eat the bandwitdh need by the game.
You'ill need to send position and states of every occurance in the game.
I think they make like that for FPS, but, hey, there is always less than 10 object in game ..
incidenta5
Posts: 37
Joined: 15 Mar 2006, 00:40

Post by incidenta5 »

Your on the right track, however I propose a slightly different idea.
The server would act as a master copy of the simulation and all clients would sync to that master copy. If a de-sync occurs, you transfer every bit of the simulation to that particular client with the game paused for the duration of the resync.

The initial exchange would be a set of checksums for various parts of the game, such as unit positions for Units 1-50, and 51-100, etc.. along with positions for Projectile 1-50, 51-100, etc...

If any one of these checks fails, you send the actual data for that particular set of client data.

The key here is to pause the game and initiate the transfer so everyones simulation is paused and is in the process of syncing.

--

As for the cheating aspect of this debate, you can do the following. You might be able to transfer checksums between clients directly (p2p fashion ?) if you piggyback off of the main Spring chat server. This would only constitute a couple dozen checksums and it would only happen when the server decides to resync.

All the resync stuff would not be done on the chatserver. The chatserver would only be used to verify that the host is not just changing values and forcing a resync on purpose. (i.e. if the host and 2 clients have the same data and client 3 has different data, then the resync by the host would most likely be legit)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

This has already been said in the mailing list
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

yeah, seems we can make it a MTR ;-)

Anyway, just not getting out of sync with same model is what I'm currently working on. What incidenta5 says is something for after that (unless someone else is going to make it...): resync if the game occasionally goes out of sync.
Post Reply

Return to “Engine”