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

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

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mburda@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 30 Apr 2004 18:18:06 -0700
Reply-to: rt@xxxxxxxxxxx

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

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.

Also you shouldn't use OVERVIEW_TILE_HEIGHT as "half" of the width. 
Just use OVERVIEW_TILE_WIDTH / 2.

Having an overview 160 pixels wide is too big.

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.

---

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).

jason




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Jason Short <=