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]
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: RFC: 8-topology system
From: Jason Dorje Short <vze2zq63@xxxxxxxxxxx>
Date: Wed, 17 Oct 2001 05:55:00 -0400
Reply-to: jdorje@xxxxxxxxxxxx

Raimar Falke wrote:
> 
> 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
> - - - - - - - - - -
> |         # #     |
> |       # # # #   |
> |     # # # # # # | <
> |   # # # # # #   |
> | # # # # # #     |
> |   # # # #       |
> |     # #         |
> - - - - - - - - - -

This will happen any time both width and height are even.  If you select
wrapping (as you've done), they'll always be rounded to the next even
number so you'll always see this.

But it's not necessary:

[jshort@jason freeciv]$ ./a.out 0 1 0 0 5 5
- - - - - - - 
|     #     | 
|   # # #   | 
| # # # # # | 
|   # # #   | 
|     #     | 
- - - - - - - 
                                                   
[jshort@jason freeciv]$ ./a.out 0 1 0 0 5 6
- - - - - - - 
|     #     | 
|   # # #   | 
| # # # # # | 
|   # # # # | 
|     # #   | 
- - - - - - - 

[jshort@jason freeciv]$ ./a.out 0 1 0 0 6 5
- - - - - - - 
|     # #   | 
|   # # # # | 
| # # # # # | 
|   # # #   | 
|     #     | 
- - - - - - - 

[jshort@jason freeciv]$ ./a.out 0 1 0 0 6 6
- - - - - - - - 
|     # #     | 
|   # # # #   | 
| # # # # # # | 
|   # # # #   | 
|     # #     | 
- - - - - - - - 


As you can see the shapes are a bit unintuitive.  They should always
follow the same patterns, though.

jason


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