Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: PATCH: tile markers
Home

[Freeciv-Dev] Re: PATCH: tile markers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Teemu Kurppa <tkurppa@xxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: PATCH: tile markers
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 16 Dec 2001 10:38:25 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sat, Dec 15, 2001 at 11:53:25AM +0200, Teemu Kurppa wrote:
> The following patch is an initial attempt to introduce tile markers to
> Freeciv. It allows player to place markers on tiles. These can be used
> to plan city placement etc. I found them very helpful in early phase of
> the game and especially with citymindist 4 or larger.
> 
> TeamCiv has similar functionality and I took the idea from there.
> However, this implementation is rather lightweight compared to Teamciv's
> implementation. Instead of a fancy red dot, just a little cross is drawn
> on a marked tile. No modifications to tilesets are needed. 
> 
> I implemented this only to GTK-client for non-isometric tiles. 
> Tiles are marked and unmarked with '*' key, similar to TeamCiv. 
> 

> A Couple of notes on the implementation:
> - Tile marker locations are stored in list. For that, I introduced a new
> type "coords", which is just a coordinate pair (x,y). 

common/map.h contains:
struct map_position {
  int x,y;
};

> - tile markers are drawn after and outside of tile drawing iteration. It
> is better to iterate over marked tiles than to check on every tile, if
> that tile is marked
> 
> - I felt a little bit uncomfortable with client code organization. It
> was hard to figure out, where to add e.g. coords list defintions.
> Anyway, I just put everything to somewhere and included appropriate
> headers. Someone with better vision of client code's structure, can
> suggest better places, if that matters. 
> 
> - Tile markers are not saved anywhere, so they are lost, if you get
> temporarily disconnected. This a bit inconvenient, but I'm not sure is
> it the worth of trouble to bring marker information to server.

Use attributes. (client/attribute)

> - I didn't yet implement the view tile markers -toggle, which probably
> should be there. 

Yes.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Premature optimization is the root of all evil."
    -- D. E. Knuth in "Structured Programming with go to Statements"


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