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: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: notify_player rewrite
From: Thue <thue@xxxxxxx>
Date: Wed, 9 Aug 2000 11:48:52 +0200

Den ons, 09 aug 2000 skrev Per I. Mathisen:
> On Wed, 9 Aug 2000, Geoffrey Dunn wrote:
> > Make everything send a "generic" version that's just text so if the
> > client can't make sense of the data it will just display the generic.
> > Then build it up step by step, patch by patch. Seems to be a good idea
> > so it can be left to the client to figure out if it requires a special
> > sound, dialog box or maybe even a movie (like for wonders or end of game)
> > and the server does not need to know just what the client can do with
> > it.
> 
> I am not sure if I understand. Are you suggesting sending the info like
> this:
>   int E_EVENT, x, y
>   char oldversion
>   char var1, var2, var3, var4
> ?
> 
> Well, that could be a way to do it. It would be less efficient but a lot
> easier to code.
> 
> Yours,
> Per

Rather
   int E_EVENT, x, y
   char var1, var2
   int n1, n2, n3, n4

(not too many strings; they take up a lot of space. They must have a max
lenght; what would they be used for besides city names?)

Then just "cast" the variables based on packet type.

I don't see the reason to include oldversion in the packet type; what
would be the need? To avoid converting all event messages at once just
leave the code the handle the old format in the client in the mean time.

As far as I can see all the event can be squezed into this format, casting
using the event type. The E_NOEVENT messages would have to be given a type
to be cast.

-Thue



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