Here's an example:
UPDATEBATTLEINFO 2878 3 0 -1755751665 Charlie in the Hills v2.1
UPDATEBATTLEINFO battleID spectatorCount locked mapHash {mapName}
Wouldn't things be better if there was a [tab] before the first sentence, as well as between sentences? As parsing goes, it would be easier to tab split, then space split the first tab split, get command name and first parameter from there, then consider tab splits 2-infinity as sentences .. rather than "everything after parameter 4 to the end of the line is the map name and it's a sentence, although there's no tab involved as a separator".
I know this might not be constructive, but I'm looking for a reason for not using a tab before the first sentence. Not a problem with maps with _ instead of spaces.
tab before first sentence
Moderator: Moderators
Re: tab before first sentence
lobby protocol has way to many restrictions:
- no named parameters, adding / removing of (optional) parameters always requires changes on lobby clients
- new features needs a new commands and needs larger changes on clients, too
- escaping isn't good: its not possible to send a tab in a sentence
- in general: way to many commands
- things i forgot
imo only a rewrite / migration to a more flexible protocol would solve such issues.
sth. like:
- use json for parameters
- reduce commands to insert/update/delete
- allow to register/unregister of getting changes to a specific scope (battle/channel/match making...)
thats already described here in a similar way: https://github.com/spring/uberserver/bl ... rtymap.txt
but i would use json as there already exists great libs for parsers.
to answer your question:
yes it would make sense but its not worth the trouble imo:
- needs a new compat flag
- all clients needs to be changed
-> the (old) compat code would exist for ages which makes maintaining uberserver code more difficult.
- no named parameters, adding / removing of (optional) parameters always requires changes on lobby clients
- new features needs a new commands and needs larger changes on clients, too
- escaping isn't good: its not possible to send a tab in a sentence
- in general: way to many commands
- things i forgot
imo only a rewrite / migration to a more flexible protocol would solve such issues.
sth. like:
- use json for parameters
- reduce commands to insert/update/delete
- allow to register/unregister of getting changes to a specific scope (battle/channel/match making...)
thats already described here in a similar way: https://github.com/spring/uberserver/bl ... rtymap.txt
but i would use json as there already exists great libs for parsers.
to answer your question:
yes it would make sense but its not worth the trouble imo:
- needs a new compat flag
- all clients needs to be changed
-> the (old) compat code would exist for ages which makes maintaining uberserver code more difficult.
-
- Posts: 98
- Joined: 22 Sep 2014, 20:29
Re: tab before first sentence
Thank you for replying, so it's mostly a legacy thing, that makes sense.