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

[Freeciv-Dev] Re: [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] Re: [patch]full fog of war
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Wed, 29 Mar 2000 15:55:12 -0500

At 2000/03/25 16:34 , Thue Janus Kristensen wrote:
>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.

Great!

>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 looked at it fairly quickly.  It looks pretty good, but I did notice a
few things:

- Capability string missing.

- Some headers are missing from new routines.  Even if the header is empty
(as so many are), it is good to have the header as a marker of the
beginning of each routine.

- There are some long lines.  It's nice to break long lines before 80 or 90
columns.

- I think I noticed a mis-ordered #include in maphand.c and plrhand.c.

- The two new routines declared at the top of maphand.c should be declared
static.

- I believe a debug printf() was left in unithand.c.  Another in cityhand.c.

- Description of fogofwar server option needs to be updated.

- I ran an all-AI game, and had some "Get_def bugged at (X,Y)" errors
reported by the server.  There don't seem to be cities at the reported X,Y
-- did you change the way unit information is reported to or used by the
AIs?  It's like the AI is trying to attack a place where a unit was but no
longer is (just a guess).  Eventually I get a thousand or so of these
messages.

- If spy tries industrial sabotage without first doing an investigate city,
she doesn't see the correct set of city improvements.

- If I load an old save-game, set fogofwar to 1 immediately, then connect
and start the game, I see all the infrastructure in the discovered world,
but only a random subset of cities.  What should happen, and why is it
currently not either all or none?  Humm...  It seems I can see all of some
nations, but none of others.

- This may be related to the previous bug, but if I load the save file, set
fogofwar to 1, then connect and start, then set fogofwar to 0, then end the
turn, the fog goes away and I can see all the units -- but I can't see any
city that I couldn't see before!  After a second turn-done, all the
invisible cities pop into view.

- Third in the series...  Setting fogofwar back to 1 from 0 doesn't hide
the cities that I shouldn't know about.

- Keying the loading of player maps off of the fogofwar value in the save
file may not be correct.  If the file was saved with the new code, it will
have the player map regardless of the setting of fogofwar.

- Also, I occasionally see "square X,Y has a seen value > 60000 (wrap)"
errors.  So far, this only happened when I was toggling the fogofwar server
option.


jjm




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