Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: RFC: 8-topology system
Home

[Freeciv-Dev] Re: RFC: 8-topology system

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: RFC: 8-topology system
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Oct 2001 11:43:25 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Oct 17, 2001 at 02:11:30AM -0400, Jason Dorje Short wrote:
> Jason Dorje Short wrote:
> > 
> > Raimar Falke wrote:
> > >
> > > On Tue, Oct 16, 2001 at 06:22:35PM -0400, Jason Dorje Short wrote:
> > > > Raimar Falke wrote:
> 
> > > > > I think that another shape is good. This may be of no real use but it
> > > > > allows use to test the code. And a non-isometric ellipse has the
> > > > > semantics of most north <=> y=0. Also such an ellipse will also have
> > > > > non-real tiles in the rectangular xsize*ysize.
> 
> > Now, the next question: iso-ellipses.  Obviously we need them, but the
> > math will be even trickier.  Do we have an ellipse inside an
> > iso-rectangle inside a flat rectangle (which is what's done for
> > iso-rectangles), or do we try to plant the ellipse directly within the
> > rectangle?
> 
> Check out the attached file.  It implements normalize_map_pos,
> is_real_map_pos, and is_normal_map_pos for all 10 of these topologies,
> then prints stuff out to show you the setup.
> 
> Everything seems to work.
> 
> The 10 topologies are:
> 
>   rectangular flat unwrapping
>   rectangular flat ns-wrap
>   rectangular flat ew-wrap ("cylinder")
>   rectangular flat wraps in both ("torus")
>   rectangular iso  unwrapping
>   rectangular iso  ns-wrap
>   rectangular iso  ew-wrap
>   rectangular iso  wraps in both (identical to torus)
>   elliptical  flat unwrapping
>   elliptical  iso  unwrapping
> 
> The implementation of an iso-ellipse is a bit inefficient; perhaps we
> can do better but this would be acceptable.

Very nice. In all isometric rectangles the top and bottom border
always is 2 tiles wide and the left and right is always one height. Is
this ok?

$ ./a.out 0 1 1 1 5 5
      two
      v v
- - - - - - - -
|     # #     |
|   # # # #   |
| # # # # # # |  < one
|   # # # #   |
|     # #     |
- - - - - - - -

$ ./a.out 0 1 1 1 9 5
          v v
- - - - - - - - - -
|         # #     |
|       # # # #   |
|     # # # # # # | <
|   # # # # # #   |
| # # # # # #     |
|   # # # #       |
|     # #         |
- - - - - - - - - -

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Life is too short for reboots."


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