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
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
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
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
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
Code:
________________________________ | | | | | | |a 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 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 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 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
Comment