google-code-export / bitfighter

Automatically exported from code.google.com/p/bitfighter
Other
0 stars 0 forks source link

Convert commands from "server side" to "client side" #119

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following commands have been implemented as "server side" commands -- this 
means they are sent to the server without any knowledge supplied from the 
client side.

setscore, settime, showbot(s), addbot(s), maxbots, kickbot(s), rename, gmute

The commands should be reimplemented as client side commands, for several 
reasons:

1) Reduce bandwidth - clients can often detect errors before commands are sent

2) Better documentation -- client side commands are automatically integrated 
into the help system

3) Command completion and argument prompting may be possible for some commands 
if the client knows about them

I think server side commands are great, when used for rapid roll-out of new 
features without requiring the release of a new client.  But they are not 
appropriate (in my opinion) for long term commands that could be implemented as 
client commands.  

The commands listed above seem to be good additions to the game, and I think 
deserve to be made permanent.  Moving them to client side should be a good 
thing.

Enough said!

Original issue reported on code.google.com by ch...@eykamp.com on 29 Aug 2011 at 9:32

GoogleCodeExporter commented 9 years ago

Original comment by watusim...@bitfighter.org on 29 Aug 2011 at 9:33

GoogleCodeExporter commented 9 years ago
When completing issue 129, I noticed that all of these commands use the 
serverCommandHandler in UIGame.cpp and that they did not exist in the giant 
CommandInfo struct.

I added them to the struct which means that at least #3 is completed above for 
these commands.

Original comment by buckyballreaction on 10 Oct 2011 at 1:44

GoogleCodeExporter commented 9 years ago
The server command handler is an easy way to add commands, but, in my opinion, 
it sort of subverts the whole intent of forcing all commands to pass through 
the struct that in turn forces documentation of the methods.  Perhaps there's a 
way to get the server command handler to process commands from the struct 
rather than the way it's being done now?  thoughts?

Original comment by watusim...@bitfighter.org on 10 Oct 2011 at 8:22

GoogleCodeExporter commented 9 years ago
Except I put these commands into the CommandInfo documenting struct...  it's 
just that the struct calls serverCommandHandler.  Unless, you are thinking of 
another place?

Original comment by buckyballreaction on 19 Oct 2011 at 4:23

GoogleCodeExporter commented 9 years ago
Finally finished with this with rda60a68bac5a.

serverCommandHandler was left for future compatibility reasons (it's a great 
hack to not need to change RPC commands and thus bitfighter major versions)

Original comment by buckyballreaction on 24 Oct 2011 at 2:35