More detailed protocol description

More detailed protocol description

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Agon
Posts: 527
Joined: 16 May 2007, 18:33

More detailed protocol description

Post by Agon »

Hi,

the ProtocolDescription.xml is partly good and partly shit.
One example is this:

Code: Select all

<Argument Name="servermode" Optional="no" Sentence="no">
        Tells what mode server is in. Currently valid are:
        <ul>
          <li>0 - normal mode</li>
          <li>1 - LAN mode</li>          
        </ul>
</Argument>
from the command "TASSERVER".
Here the server mode can have two statements:
LAN mode or normal mode which should be renamed in Internet mode, or not?

It would be better if the 'Argument' stores a information about which type it is, like string, int, bool, float, double and maybe url.
But much better it would be then it would look like this:
<Argument Name="servermode" Optional="no" Type="xy">
Description of the argument
</Argument>
and xy can be: string, int, bool

Also take a look here: http://thousandparsec.net/tp/dev/docume ... tocol3.php
They did it much better. Okay programming a code generator for it takes more time but the code which it produces is much better due type descriptions.
Also the transport string is much easier to read:
For example: <4>blah<5>blah2
Which is a int (4), text (blah), int (5), text (blah2)

As we will have a new lobby server could it be changed for it?

Edit01:
Oh and also yes and no aren't good. It should be true and false;

Edit02:
And names should not be like this: "name and version" with white spaces.
This is from:

Code: Select all

<Command Name="REQUESTUPDATEFILE" Source="client">
      <Arguments>
        <Argument Name="name and version" Optional="no" Sentence="yes">
Edit03:
What I do not like, too is:
Two commands named the same like: "JOIN"

Edit04:
A argument name named: "..." in command "DISABLEUNITS".
That is really bad.
Oh while I was writing this I understand what ... means. Unlimited arguments.
Okay now it gets super bad. What is ... for a description for a unlimited list of unknown objects?
Post Reply

Return to “Feature Requests”