Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] bugfix for wrapping problem
Home

[Freeciv-Dev] Re: [PATCH] bugfix for wrapping problem

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: rf13@xxxxxxxxxxxxxxxxxxxxxx, Jason Dorje Short <jshort@xxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] bugfix for wrapping problem
From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
Date: Fri, 24 Aug 2001 14:01:43 -0700 (PDT)

On Fri, 24 Aug 2001, Ross W. Wetmore wrote:
> If this is a bugfix, get someone knowledgable to validate it.

I wrote as much of the freeciv client as anyone, so I think I qualify as an
expert.

Drawing the same tile multiple times if the map window is large enough to wrap
around is the wrong thing to do.  It is what the client used to do, I first
noticed that when I added support for different sized tiles.  I made some tiny
15x15 tiles that let me wrap around. 

It didn't work exactly right though, as when a unit moved it would only move
one of the copies on the map.  The unit movement code would look for the
position of the unit on the map canvas, then move it.  It didn't check if the
unit was on the canvas twice and move it twice.  Same with pretty much all the
code that updates the map, only one copy is updated.  The only reason it
appears to work at first, is because the map refresh is triggered by the
canvas tile. 

Getting a wrapped around map to work properly would be a major undertaking. 
All the map update code assumes that in order to show X on the map, it just
needs to find out where X is and draw it once.  Having to worry about finding
all copies of X on the map and drawing each one of them would be a major pain
in the ass to code.  No way is it worth it, especially for something that
would be a visual nightmare.




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