Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] (PR#8627) best overview for iso-maps
Home

[Freeciv-Dev] (PR#8627) best overview for iso-maps

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#8627) best overview for iso-maps
From: "Marcelo Burda" <mburda@xxxxxxxxx>
Date: Fri, 30 Apr 2004 23:22:57 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8627 >

> [jdorje - Sam. Mai. 01 01:18:05 2004]:
> 
> Marcelo Burda wrote:
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=8627 >
> > 
> > Hi
> > I was exasperated by the shape of overview in iso-maps. the overview is
> > in native coordinated and this compress x axes. this litle patch make
> > the overview in natural coordinates.
> > the way i am choiced is the simplest one. basicaly  i make 
> > OVERVIEW_TILE_WIDTH *=2; and a litle correction.
> > the final shape is really best.
> > but is not perfect! i use rectangular tiles, to make a perfect overview
> > we need use squared rotate 45°. but this is not good for the overview!
> 
> It's far from perfect; I'm not even sure that it's better.
> 
> There's something wrong with your algorithm, though.  See 
> http://rt.freeciv.org/Ticket/Attachment/51667/37602/problem.png.  The 
> island in the mapview is completely symmetrical, but in the overview it 
> is not.  This is exactly the type of problem you're trying to fix.
Ups!! i mised overview_update_tile() when extracting it from Extended
Topologies patch. sorry, there is the full one!
> 
> Also you shouldn't use OVERVIEW_TILE_HEIGHT as "half" of the width. 
> Just use OVERVIEW_TILE_WIDTH / 2.
there is not posible to make it if OVERVIEW_TILE_WIDTH == 1 !
> 
> Having an overview 160 pixels wide is too big.
probably. but not on my monitor ;-) (corrected)
> 
> And before we double the overview size (doing the overview in "natural" 
> coordinates) we need to fix the default behavior of the server, that 
> makes iso-maps way too wide.
test it with xsize=40 ysize=50 (or 70-56) this are good ratios for the
classic topo in iso maps.

i need stract my patch about fixing the ratio (map.size map.ratio
proposal) from Extended Topologie, this is the next in my list to be
stracted, and the more complex, i need to rewrite it to be made more
clear code. then this problem will be fixed
> 
> ---
> 
> I think to get the overview to look good we need to do it in natural 
> coordinates, using anti-aliasing at the tile boundaries.  Say we have 
> width == 2 and height == 1.  These are the overview sizes of the natural 
> (like native, but uncompressed) grid.  So ntl(0,0)==nat(0,0), 
> ntl(2,0)=nat(1,0), ntl(1,1)==nat(0,1).  ntl(1,0) doesn't correspond to 
> any tile...so we color it as the average of the adjacent tiles.
> 
> I'm not sure how well this exact algorithm will work, but I'm quite 
> convinced we need to use anti-aliasing to get good results.
> 
> However this will present a problem in the implementation.  The common 
> code runs on a paletted system (enum color_std in colors_g.h).  To do 
> anti-aliasing we need to be able to give a full (r,g,b) pair to the GUI 
> code (canvas_put_rect).
i no find easy way to make overview  then i make this simplest patch to
make something best

some type of mini tile can be used! but the minimum wide of overview can
be too big the wen need a scroll bar for overview!
the minimum mini tiles is 4x4
0MM0
MMMM
MMMM
0MM0
 where M are the mask bit, this need a minimum overview wide of 4*xsize.
this simplest patch only need half of it


> 
> jason
> 
> 
> 
Marcelo

Attachment: overview_tuning.diff
Description: Binary data


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