Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] Re: notify_player rewrite
Home

[Freeciv-Dev] Re: notify_player rewrite

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: notify_player rewrite
From: Reinier Post <rp@xxxxxxxxxx>
Date: Thu, 10 Aug 2000 12:03:15 +0200

On Wed, Aug 09, 2000 at 09:38:49AM +0200, Per I. Mathisen wrote:
> Currently, the various notify_player routines send information about
> events (E_XXXX from common/events.h) as text strings to the client. I do
> not think this is a good solution, and would very much prefer all text
> messages to be produced on the client, and for the server to send only the
> necessary parameters. For (an imagined) example, instead of sending
> "The player so-and-so conquered city so-and-so">, the server should
> just send playernumber & citynumber and leave it to the client to
> construct a decent info message.

You're proposing an improved gettext, but with an as-yet-unknown,
Freeciv specific, compact and binary source language (defined in terms
of C data structures).  In principle it's superior to sending text, but
I don't like the idea of having more Freeciv packet types because the
transmission of C data structures over the network is such a pain.
So I think your proposal will complicate the addition of new messages.

> So, I could add new a new packet for each event type... this would
> probably triple the number of network packets in freeciv. It is a simple
> solution, but the packet code would become messy with so many packets.

I don't find the code messy, but very repetitive.
 
> Any suggestions?

An XML-based protocol ...

-- 
Reinier



[Prev in Thread] Current Thread [Next in Thread]