Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2000:
[Freeciv-Dev] [patch]full fog of war
Home

[Freeciv-Dev] [patch]full fog of war

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] [patch]full fog of war
From: Thue Janus Kristensen <thue@xxxxxxx>
Date: Sat, 25 Mar 2000 22:34:34 +0100

In fog of war lite (as before this patch) you wouldn't see units in fogged
squares, but you would still get terrain and city updates. full fog of war means
that you won't see these changes either. So it is FX possible for a city to
exist in a fogged square, or a city you see can be gone when when you see the
square again.
To acomplish this each player must have his own map. Each tile in this map also
contains a timestamp (a game year) so that when two players exchange maps, and
both see a tile as fogged, the timestamps will be compared and the most resent
info sent.

number_known_bugs = 0;
Not terribly tested, thought. (but I did test revolution :) )

Pretty much rewrites the old fog of war code for increased efficiency and
clarity, and of course some changes were needed for full fog of war.

I extended the transfer_city function. In the old code whenever if was used it
was followed by 10-15 lines, in slightly varying sequence. (looked cut-pasted).
_very_ ugly.

Each player now have his own malloced map of player_tile's and dumb_city's

Savegame size has increased alot; unavaoidable when each player have his own
map of all cities and tiles.

In old freeciv when information about a city was sent to a nonowner _all_ info
was sent. it was neccesary as a part of this patch to scale down the info. Not
a bad thing. Now we just send a packet with dummy-values, for bandwidth and
code clarity we should just send the info that the client actually need, but
that can be done later.

-Thue

Attachment: full_fog_of_war-Mar-25.diff.bz2
Description: Binary data


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