Network

Network

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
The_Fallen
Posts: 4
Joined: 20 Dec 2005, 15:01

Network

Post by The_Fallen »

Hi,

I'm sorry that I have to ask this question here, but I cannot check it out by myself for the next two weeks...
Do Spring and TA use the same network protocol (in terms of what packet is when)? So could I connect Spring to a TA server and vice versa?

And another question, which is of much more interest for me: Is there any information available about the network protocol TA uses? I'd like to be able to connect to a TA server from within my own program...
I could just sniff the network traffic and figur it out by myself, but that would really be a pain in the ass...

thx,
fallen
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Springs network protocol is different, and changes slightly from version to version. It was built form the ground up by SJ and wouldnt be able to connect to a TA server.
The_Fallen
Posts: 4
Joined: 20 Dec 2005, 15:01

Post by The_Fallen »

Hmm, okay, thanks...
But what about my second question? Does anyone know if there's some information about the network protocol used in TA?
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

There is some talk about the network protocol on the Linux mailing list.
The_Fallen
Posts: 4
Joined: 20 Dec 2005, 15:01

Post by The_Fallen »

What a Linux mailing list do you mean?

Some other question about the network system of Spring: you assume that Spring runs synchronized on all computers, but I wonder how this works correctly? What if there is a client with high latency and a command for shooting arrives to late at this client? Then on one client there is a dead unit and on the other one there is not. I would think that this happens very often...
Sorry for this (possibly) stupid question, but up to now I was only working with Quake like net codes, where it is impossible to get unsync clients...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

You do get unsynced clients in spring, the engine generates hashes absed on all the units it ahs track of and what they are and their positions, then sends it to the host, and the host compares them all, and if there's a mismatch then it fires off an out of sync message.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Some other question about the network system of Spring: you assume that Spring runs synchronized on all computers, but I wonder how this works correctly? What if there is a client with high latency and a command for shooting arrives to late at this client? Then on one client there is a dead unit and on the other one there is not. I would think that this happens very often...
It works like this:

-client generates a command with the GUI, and sends it to server
-server sends the commands to all clients
-clients receive it and apply it to their running game.

You see, if there is lag or no connection at all, the command isn't used at the local client as well.
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

The_Fallen wrote:What a Linux mailing list do you mean?

Some other question about the network system of Spring: you assume that Spring runs synchronized on all computers, but I wonder how this works correctly? ...
The list: http://lolut.utbm.info/cgi-bin/mailman/ ... ring-linux
Archive: http://lolut.utbm.info/pipermail/taspring-linux/
Read up on the "Game network syncing" thread and your can help out.

Keeping Spring synchronized is a problem with the multiplatform version.
Fnordia
Former Engine Dev
Posts: 425
Joined: 13 Aug 2004, 16:11

Post by Fnordia »

The closest thing to documentation of the original TA network format is probably the sourcecode for the TA demo recorder. It's been a few years now since we worked on that however. If you have any specific questions about it I can try to answer them though. :)
The_Fallen
Posts: 4
Joined: 20 Dec 2005, 15:01

Post by The_Fallen »

Thanks!
Post Reply

Return to “Engine”