Announcement

Collapse
No announcement yet.

Most interesting topology

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Most interesting topology

    cylinder: (currently used in freeciv) if a unit goes off the left side of the map it wraps around to the right side, and vice versa
    Code:
     ________________________________
    |                                |
    |                                |
    |                                |
    |a                              b|
    |                                |
    |                                |
    |                                |
    |                                |
     ________________________________
    a unit going left from point a would move to point b
    a unit moving left from point ( x_min, y ) would move to point ( x_max, y )
    toroid: (very common in RPG's) if a unit goes off the top of the map it wraps around to the bottom and vice versa, also any unit that goes off the right side wraps around to the left and vice versa
    Code:
     ________________________________
    |            c                   |
    |                                |
    |                                |
    |a                              b|
    |                                |
    |                                |
    |                                |
    |            d                   |
     ________________________________
    a unit going up from point c would move to point d
    a unit going left from point a would move to point b
    a unit moving left from point ( x_min, y ) would move to point ( x_max, y )
    a unit moving up from point ( x, y_max ) would move to point ( x, y_min )
    square: no wrap-around effects at all
    mobius strip: indistinguishable from a cylinder unless there is some way for units to move through the surface, and the wrapping rules are different
    Code:
     ________________________________
    |            c                   |
    |                                |
    |     a                          |
    |                                |
    |e                              f|
    |                     b          |
    |                                |
    |                            d   |
     ________________________________
    a unit that digs a hole to the other side from point a would come out at point b
    a unit that went up from point c would move to point d
    a unit that went right from point e would move to point f
    a unit that digs a hole to the other side from point ( x, y ) would come out at point ( ( x + ( map_x_size / 2 ) ) % map_x_size, ( y_max - y ) + y_min )
    a unit that went up from point ( x, y_max ) would move to point ( ( x + ( map_x_size / 2 ) ) % map_x_size, y_min )
    a unit that went left from point ( x_min, y ) would move to point ( x_max, y)
    cylinder capped with frictionless hemispheres: a unit that goes off the map comes back on halfway around from where it started
    Code:
     ________________
    |   a       b    |
    |                |
    |e              f|
    |    c       d   |
     ________________
    If a unit went up from point a it would move to point b(and vice versa).
    If a unit went down from point c it would move to point d(and vice versa).
    if a unit wend left from point e it would move to point f
    if a unit went up from point ( x, y_max ) it would move to point ( ( x + ( map_x_size / 2 ) ) % map_x_size, y )
    If a unit went left from point ( x_min, y ) it would move to point ( x_max, y)
    post any thoughts you have on these topologies and ideas for other topologies

    Edit: typos and explanations
    Tip: do not write explanations when you are tired
    Edit: added formulas for figuring out where a unit ends up in the special cases
    8
    cylinder
    0.00%
    0
    toroid
    37.50%
    3
    mobius strip
    25.00%
    2
    square
    25.00%
    2
    cylinder capped with frictionless hemispheres
    0.00%
    0
    the one in my post
    12.50%
    1

    The poll is expired.

    Last edited by geeslaka; June 25, 2003, 18:24.
    American by birth, smarter than the average tropical fruit by the grace of Me. -me
    I try not to break the rules but merely to test their elasticity. -- Bill Veeck | Don't listed to the Linux Satanist, people. - St. Leo | If patching security holes was the top priority of any of us(no matter the OS), we'd do nothing else. - Me, in a tired and accidental attempt to draw fire from all three sides.
    Posted with Mozilla Firebird running under Sawfish on a Slackware Linux install.:p
    XGalaga.

  • #2
    If a unit went up from point a it would move to point b(and vice versa). If a unit went down from point c it would move to point d(and vice versa). if a unit goes off the map at point (x,y) it comes back on at point ((x+(map_x_size/2))%map_x_size, y)
    What?
    The Chuck Norris military unit was not used in the game Civilization 4, because a single Chuck Norris could defeat the entire combined nations of the world in one turn.
    - Chuck Norris Facts

    Comment


    • #3
      Think of that rectangle as being wrapped around a cylinder. Now place a hemispere on each end of the cylinder. Now imagine that a legion is at point a. That legion moves up onto the hemispere. Since the hemisphere is frictionless the legion cannot stop on it. The legion slides all the way around until it hits the cylinder. The formula is the way to figure out where the legion ends up.
      American by birth, smarter than the average tropical fruit by the grace of Me. -me
      I try not to break the rules but merely to test their elasticity. -- Bill Veeck | Don't listed to the Linux Satanist, people. - St. Leo | If patching security holes was the top priority of any of us(no matter the OS), we'd do nothing else. - Me, in a tired and accidental attempt to draw fire from all three sides.
      Posted with Mozilla Firebird running under Sawfish on a Slackware Linux install.:p
      XGalaga.

      Comment


      • #4
        Another topology came to me in a dream last night. Take the formula that is applied to the top and bottom of the rectangle in the cylinder capped with frictionless hemispheres topology. Apply that formula to cases where units go off the left or right side as well and you get a much more complex topology.
        Code:
         ________________________________
        |         a               b      |
        |h                               |
        |                               c|
        |                                |
        |                                |
        |g                               |
        |                               d|
        |           f               e    |
         ________________________________
        If a unit goes up from point a it moves to point b.
        If a unit goes right from point c it moves to point d.
        If a unit goes down from point e it moves to point f.
        If a unit goes left from point g it moves to point h.
        American by birth, smarter than the average tropical fruit by the grace of Me. -me
        I try not to break the rules but merely to test their elasticity. -- Bill Veeck | Don't listed to the Linux Satanist, people. - St. Leo | If patching security holes was the top priority of any of us(no matter the OS), we'd do nothing else. - Me, in a tired and accidental attempt to draw fire from all three sides.
        Posted with Mozilla Firebird running under Sawfish on a Slackware Linux install.:p
        XGalaga.

        Comment


        • #5
          From a certain perspective, the Moebius Strip is what the current map already is.
          Blog | Civ2 Scenario League | leo.petr at gmail.com

          Comment


          • #6
            Yeah. I wrote in my explanation for the moebius strip that it indistinguishable from a cylinder unless some special things are done.
            American by birth, smarter than the average tropical fruit by the grace of Me. -me
            I try not to break the rules but merely to test their elasticity. -- Bill Veeck | Don't listed to the Linux Satanist, people. - St. Leo | If patching security holes was the top priority of any of us(no matter the OS), we'd do nothing else. - Me, in a tired and accidental attempt to draw fire from all three sides.
            Posted with Mozilla Firebird running under Sawfish on a Slackware Linux install.:p
            XGalaga.

            Comment


            • #7
              I vote for the mobius strip. Okay, okay, gamewise an ordinary map plays the same but if you could teleport/warp to the opposite 'side' it would become something else. There's something appealing about playing on a map with that feature.

              Would make for a great SF scenario.
              Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

              Elie A. Shneour Skeptical Inquirer

              Comment


              • #8
                I think(sometimes) there are four ways of implementing the ability to dig through the surface of the moebius strip:
                (simplest first)[list=1][*] Add a terrain improvement that settlers/engineers can build
                A settler can be told to build a tunnel on a space. When that tunnel is finished units can move through it to the other side.
                Requires: 2 orders(one to tell the settler to build the tunnel, one to tell units to move through it) and 1 terrain improvent[*] Make all units able to move to the other side
                Requires 1 order[*] Add a unit flag
                In units.spec units could be flagged to indicate that they can move itself to the other side.
                Requires 1 unit flag and 1 order[*] Combine 1 and 3[/list=1]
                I favor 4.
                American by birth, smarter than the average tropical fruit by the grace of Me. -me
                I try not to break the rules but merely to test their elasticity. -- Bill Veeck | Don't listed to the Linux Satanist, people. - St. Leo | If patching security holes was the top priority of any of us(no matter the OS), we'd do nothing else. - Me, in a tired and accidental attempt to draw fire from all three sides.
                Posted with Mozilla Firebird running under Sawfish on a Slackware Linux install.:p
                XGalaga.

                Comment

                Working...
                X