Page 1 of 1

named parameters in lobby protocol

Posted: 17 Sep 2014, 01:17
by abma
currently lobby protocol has only one command which used named parameters:

SETSCRIPTTAGS:

http://springrts.com/dl/LobbyProtocol/P ... AGS:client

for future commands i want to use named parameters too, because they are easily extendable! currently we have the problem, that parameters can't be added without breaking old lobby clients this is why it is needed as it directly allows optional parameters.

what do you think, is our custom format for named parameters better or json or sth. different?

Zero-K lobby uses json in many parts already in the lobby protocol (in private messages, etc).

thoughts about this? for named vars use our current implementation or json? (or sth. "better" / different?)

Re: named parameters in lobby protocol

Posted: 17 Sep 2014, 02:56
by CarRepairer
Old lobby clients don't break because those that use the new protocol pass a flag, right? So the server behaves the old way unless the client passes a flag on login and then it behaves the new way.

Yes this is a great idea. +1 to json.

Re: named parameters in lobby protocol

Posted: 17 Sep 2014, 08:35
by Silentwings
I don't have much opinion on the specifics of changing the protocol, although named params are obviously better imo.

I think its more important to sort out the servers issues than it is to support unmaintained lobby clients; there are enough good lobby clients which are maintained. I am more worried about making sure autohosts would be compatible with changes.