Discussion:
[Freecol-developers] killing players and tile ownership
Enrico Weigelt, metux IT consult
2016-12-09 02:04:37 UTC
Permalink
Hi folks,


I'm just having a look at ServerPlayer::csKill(). IIRC it sends out
CS'es for all the individual changes caused by killing a player, eg.
removing it's settlements, diplomatic relationships, etc.

Do we really need that traffic at all ? Why not just sending a kill
player notification the clients and let them do all the cleanup on
their own ?


--mtx
Michael T. Pope
2016-12-09 05:40:21 UTC
Permalink
On Fri, 9 Dec 2016 03:04:37 +0100
Post by Enrico Weigelt, metux IT consult
I'm just having a look at ServerPlayer::csKill(). IIRC it sends out
CS'es for all the individual changes caused by killing a player, eg.
removing it's settlements, diplomatic relationships, etc.
Do we really need that traffic at all ? Why not just sending a kill
player notification the clients and let them do all the cleanup on
their own ?
Why pick on csKill? All of the cs*() routines work like that. FreeCol is
very much a client-server application --- the client sends requests, and
the server tells it what happened (as minimally as reasonably possible). I
do not see the point in doing kill processing in the client, because the
server has to do it anyway, so you are just duplicating effort.

Worse still, back when I joined FreeCol (around 0.7.3?) there *was* more
client side processing, and we had a continual run of client-server
desynchronization bugs, where the client did something slightly different
from the server. Having fixed a lot of those I have no wish to return to
that mode.

It is a good thing for the FreeCol client to be dumb. Every time I have
run any performance profiling, the limiting routines are in the
graphics/map display. That is where the client needs to be putting its
effort.

Cheers,
Mike Pope

Loading...