Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2003:
[Freeciv-Dev] Re: borders patch (PR#1870)
Home

[Freeciv-Dev] Re: borders patch (PR#1870)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: borders patch (PR#1870)
From: "Ben Webb" <ben@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Jun 2003 09:23:40 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Fri, Jun 13, 2003 at 08:52:29AM -0700, Mike Kaufman wrote:
> On Fri, Jun 13, 2003 at 07:42:06AM -0700, Ben Webb wrote:
> >     The borders code determines the national ownership of each tile
> > at the server, and sends this in tile_info packets to clients. Hence,
> > the approach has been server POV for some time. The fog of war bug is
> > caused because the server only sends tile_info packets for non-fogged
> > tiles; in the latest patch, updated ownership information is now sent
> > for fogged tiles as well. As I've mentioned previously, this does mean
> > that you can guess at enemy city locations rather accurately
> 
> I agree, this is awful. If the server only sends updated nation ownership
> for unfogged tiles, what are the consequences for the client? (where will
> the client die?)

It won't die, but you get very confusing behaviour, because you don't
know where your _own_ borders are. This was what happened with the
previous patch; see Jason's post for more explanation, and a screenshot
of the problem. This will only get worse when you try to use the border
information to determine stuff like where you can place city workers,
ownership of watchtowers etc., and diplomatic incidents.

> I imagine that we need to provide some mechanism for "stale" information. A
> flag in the tile struct? That way the client can at least make a decision
> on how far to trust the information it has.

The way I'd code it would be to simply add ownership information to the
player map. This is only updated and sent to the client if ownerships
change such that your own borders move (i.e. your own tiles, or those
directly bordering them, alter, as I described previously). So the
ownership information would be "fogged" in the same way as terrain and
specials (i.e. it persists between reconnects, savegames, etc.) except
that you are given a little extra information about otherwise fogged
tiles so that your own borders are consistent.

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"Go ahead, make my day."
        - Clint Eastwood, 'Sudden Impact', 1983



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