Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] (PR#6630) Re: How hard would it be to make a "power map"?
Home

[Freeciv-Dev] (PR#6630) Re: How hard would it be to make a "power map"?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6630) Re: How hard would it be to make a "power map"?
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 24 Oct 2003 12:16:58 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Bernd Jendrissek wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi all
> 
> I'm currently spending a few minutes here and there every day for the
> last few months on this huge map-of-europe game, playing solo,
> interrupted only by barbarians.  Unfortunately I don't bother properly
> defending *all* my cities, so the barbs by now have stolen Amphibious
> Warfare from my cities. (*)
> 
> I'd like to avoid losing yet another city to them before they start
> nuking me.  :)
> 
> So my question is, how hard would it be to build a "power map" so I can
> quickly see where my weak spots are?  I'm imagining some sort of map
> that maintains the total damage that can be inflicted on any given
> square *immediately* (same turn).  Basically, the result I want is a
> "mode" for the minimap that shows me (in red) all the squares that are
> *not* immediately reachable by any of my bombers, nukes and armors.
> 
> The naive approach I imagine is to loop over all tiles, and over all
> units, and add up all the attack values each can inflict.  But that's
> just, erm, naive.
> 
> Maybe rather do a global reachability map that divides the map up into
> "military continents", taking into consideration such things as
> railroads, which give free movement, just to avoid looking at *all*
> squares individually.
> 
> Would this be better done in the server, or could it just as
> easily/hardly be done in the client?
> 
> Hmm, just wondering.

It can be done by the client:

   - For every unit you possess.
   - Loop over every tile reachable by that unit this turn.
   - Mark it as reachable.

It's easy if you just do it once; harder to keep regularly updated.  The 
GUI could either be done as an overview on the mapview or by replacing 
the overview.

Hmm, on further review I think this could be a very good thing for the 
overview.  If we gave a radio-selection of overview choices for the 
overview:

   - Basic terrain, units, and cities (default/current)
   - Military power grid
   - Territory grid

then toggling between them would just affect the behavior of the 
overview_tile_color() function.  But what other forms of information 
would people want to see?

jason




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