Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] Re: (PR#4594) topology fix for goto route packet
Home

[Freeciv-Dev] Re: (PR#4594) topology fix for goto route packet

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4594) topology fix for goto route packet
From: "rwetmore@xxxxxxxxxxxx" <rwetmore@xxxxxxxxxxxx>
Date: Fri, 22 Aug 2003 14:14:12 -0700
Reply-to: rt@xxxxxxxxxxxxxx

No, Mike.

You don't need to move to (-1,-1). Either it is an unreal coordinate if
you don't wrap, or the origin can be shifted to make it so (which also
makes it a sensible origin for array accesses and other usage). You
cam move to (map.xsize-1, map.ysize-1) or one of the infinite other
equivalent positions excluding the one special one in a wrapping topology.

There is no *need* to move to coordinate (-1,-1). If it is a special
coordinate value the code should insure this when the coordinate is first
created, which mostly it already does with iterators and such.

Don't assume because you might dream of using it, you absolutely need to
include it before you then try to remove it. Just remove it from the get
go by choosing the right coordinate system :-).

The discussion of having special coordinates, vs always having to check
an is_valid coordinate bit before accessing a coordinate is a separate
one with the current status that the code is hardwired to using special
coordinates.

You might want to refresh yourself from the past discussions on this, but
for now, Jason just needs to understand the way the current code is built
and make sure general topologies is built in conformance, rather than
adding or changing features in unnecessary and unnecesarily hard to fix
ways.

Apparently, there are a number of others that don't quite get it yet as
well, and are making rather simplistic assumptions from some overly
simplistic claims. The bizarro will fade when you figure it all out,
or will shift to those who try to make things unnecessarily complicated
by not thinking them fully through.

Cheers,
RossW
=====

Mike Kaufman wrote:
> On Tue, Aug 12, 2003 at 09:55:46AM -0700, rwetmore@xxxxxxxxxxxx wrote:
> 
>>Note, there is only one topology that requires you to deal with (-1,-1)
>>as a real coordinate. That is an infinite plane, i.e. one in which all
>>coordinate values are unique and defined. In this case, removing one or
>>more of the coordinate locations for special purposes means those
>>locations are not available within the space. This is the standard
>>tradeoff against having to define a non-coordinate test. The debate
>>here currently stands that it is more convenient to define special
>>values within the coordinate space and lose such locations.
>>
>>In all other topologies, there is *never* a requirement to use (-1,-1)
>>as a real coordinate. It is *always* possible to represent the location
>>as another coordinate value.
>>
>>Freeciv is unlikely to ever handle the infinite plane case, as there are
>>too many bounds limitations to be resolved first :-). So there is and will
>>never be a need in Freeciv to deal with (-1,-1) as a real coordinate. Thus
>>any further considerations of such a definition or requirement should be
>>dropped as completely counterproductive.
> 
> 
> huh Ross? A bicylinder topology should get you (-1,-1) quite easily. Am I
> wrong? In an 80x50 map, isn't (80,50) == (-1,-1)? If a unit is at (0,0) and
> moves "northwest", is it not on (-1,-1) before normalization?
> 
> Frankly this whole discussion seems to be in bizarro world. It's plain as
> day that (-1,-1) is a perfectly legitimate coordinate unless the server
> defines it specially in which case the client better the hell know about
> it. But if that's the case, we require the client normalize any special
> coordinates: seems onerous.
> 
> Explain again why an extra bit sent is not the wisest course of action?
> 
> -mike




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