Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [PATCH] Formatting cleanup.
Home

[Freeciv-Dev] Re: [PATCH] Formatting cleanup.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Reinier Post <rp@xxxxxxxxxx>
Cc: Freeciv developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [PATCH] Formatting cleanup.
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 8 Oct 2001 10:50:26 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Mon, Oct 08, 2001 at 09:53:04AM +0200, Reinier Post wrote:
> On Sun, Oct 07, 2001 at 09:52:19PM -0400, Jason Dorje Short wrote:
> 
> [among many other things]
> 
> > > > I say again: any time you are wrapping an unreal coordinate, or
> > > > doing anything at all to it for that matter outside of converting it
> > > > to a real coordinate, you are doing something fundamentally,
> > > > theoretically wrong.
> > > 
> > > I'm afraid that it is your reasoning that is fundamentally,
> > > theoretically wrong.
> > 
> > Naturally, I disagree.
> 
> As a bystander I would like to say that it is still unclear to me
> what an 'unreal' coordinate is supposed to be, and yes I do try to
> follow the whole thread.  Also for many postings it is unclear
> which exact set of topologies they discuss. The whole notion of
> normalization doesn't apply to some of the example maps.
> 
> As long as all of you are clear on this it doesn't matter, but from
> remarks such as these I get the idea that this isn't the case.
> 
> Perhaps it would be better to provide some clear mathematical definitions.
> Defining these things in terms of patches to the code base doesn't seem to
> work very well.

I don't think that the following is very mathematical, but it is the
current state of what I know:
 - the set of all possible positions is called S
 - there is a set of real positions called R
    [ so far I think that if we implement the isometric map than at
      least the core (server and common) are ready to allow R to be
      ANY subset. Even very weird ones. with holes and so. ]
 - there is a set of position which form a rectangle (lets call it
 A). A is the bounding box of R (i.e. A is the smallest rectangle
 which can hold all elements of R).
 - because of wrapping there are 0 or infinite copies of a given base
 set (for example A) which can all be mapped to the base set. Let
 C(base set) be the set of all this copies.
 - R is a subset of A
 - for the current map: R==A
 - for the isometric map: R is a proper subset of A
 - the set S\C(R) are the unreal positions (at least be the definition
 of is_real_tile)

is_real_tile: 
 - S->{true, false}
 - is_real_tile(x) = true <==> x \element C(R)

normalize_map_pos:
 - the transformation outcome is undefined if "x \not\element C(R)"
 - C(R) -> R

is_normal_map_pos (this method is proposed and not yet implemented):
 - S->{true, false}
 - is_normal_map_pos(x) = true <==> x \element R

Technically:
 - all tiles are saved in an 2d array of the size of A
 - some position of the array may not be used for an isometric map (if
 A\R is non-empty)
 - we catch all elements of R if we loop over A and call
 is_normal_map_pos to test

You see that the A is only a helper which is technically necessary.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx       phone: +49 351 4415773     icq: 54420251
 pgp 2: id: 0F9D7955 len: 1024 fingerprint: 7760F933D5478009 4FA0C56F1DC2FB8E
    1) Customers cause problems.
    2) Marketing is trying to create more customers.
  Therefore:
    3) Marketing is evil.


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