Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2003:
[Freeciv-Dev] Re: (PR#3936) introducing native coordinates
Home

[Freeciv-Dev] Re: (PR#3936) introducing native coordinates

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3936) introducing native coordinates
From: Ross Wetmore <rwetmore@xxxxxxxxxxxx>
Date: Sat, 26 Apr 2003 13:26:21 -0400


Jason Dorje Short wrote:
Raimar Falke wrote:
On Thu, Apr 24, 2003 at 08:58:16AM -0500, Jason Dorje Short wrote:
[...]
Something truly simple could be written with basic wrapping, ignoring the iso nature of the mapview. This is what the current code does, but it has a signficant bug: even if you make the canvas infinitely large some tiles will never be shown.

I don't think the "infinitely large" condition is cited correctly here.
Once you pass the bounding box size, all coordinates will be shown.

Making things infinitely large in only one dimension may lop off positions
that could be shown at some multiply wrapped location in that dimension.

But such candycane maps, while an interesting possiblity, would be so
confusing to interpret that outlawing them is a good thing. And whether
or not candycane maps will ever cover all of a map is subtly dependent
on the map dimensions and size of the stripe. For example, the stripe
might be just in sync and repaint the same area over and over in
subsequent loops, never to overlap with neighbouring points. Or it may
repeat the same coordinates many times adding only a small extra band
on each revolution. Changing the canvas window dimensions or the map
dimensions in minor ways would of course change such "beat" paterns.

The summary, is don't ever think of going there.

For full correctness, unnormalize_map_pos should take a width and height parameter. This also potentially allows multiple drawing of tiles. However, this makes it even more complicated and only helps in a few pathological cases.

No. Wrong approach that misses the underlying invariants of the system.

jason

Cheers,
RossW
=====



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