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?)
named parameters in lobby protocol
Moderators: Moderators, Lobby Developers
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: named parameters in lobby protocol
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.
Yes this is a great idea. +1 to json.
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: named parameters in lobby protocol
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.
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.