### Author Topic: random map part question  (Read 2935 times)

#### wowthebag

• Guest
##### random map part question
« on: May 23, 2007, 12:50:10 am »
i dont quite unterstand how the random map parts are to be split up...

i looked at the random map part page (http://ufoai.ninex.info/wiki/index.php/Mapping/Random_map_parts), and it seems that in the right picture shown, there actually are buildings crossing the 256 unit limit... which is kinda strange, wont the building be cut up if assembled differently?

shouldnt everything fit within a single 256x256 map tile, so they can be arbitrarily fit together?

im lost. how does this work?

thx for the help,
wtb

#### Wanderer

• Guest
##### random map part question
« Reply #1 on: May 23, 2007, 01:59:32 am »
I've tried to clean up the edit on this in the wiki, but it's still a hair confusing.

The reason the right picture doesn't fit what you're expecting is because you're thinking of independent tiles.  That map piece is 3 tiles, and must fit into the 'random map build' with all 3 tiles and things will then go around it.

The reason for things like this is so you can build a decent sized house, or create a dropship landing area, that are almost required to be more then one tile in size.   The dropship literally doesn't fit into a tile.

So, what happens is the system, using the 'definition matrix' that's described with all the a's, b's, c's, etc. is used to hook these oddly shaped tiles together.

http://ufoai.ninex.info/wiki/index.php/Mapping:Random_map_assembly is the way the definitions work for these mappings.  To build a tileset map for a random map build, you need to have an understanding of what's already built into the UMP, so you can define what 'type' of tile(s) you're building.

In the end, you're right, you need some 1x1 tile maps to fill in the 'holes' in the map left by these oddly shaped tiles if something else doesn't seem to fit right.  However, a tile set shaped like:

Code: [Select]
`-- --    |-- --|`

that has holes in the middle left and bottom right is perfectly legal, as long as your tiles start at the 0,0 grid mark and work to the upper right as you build them.  When you define the matrix for the above map (say it was a curved street from the example in the wiki), it would look like:
Code: [Select]
`ab  ab  ab  abb   +b  +a  ac0    a  +a  acac  +a  +a  acac  +c   a   00    c   0   0`

Notice how the +'s define the positions of ACTUAL tiles in the map.  The non+'s define what tiletypes are allowed to exist neighboring it.

Along the top, 'any' or 'horizontals' are allowed.  A 'horizontal' is necessary to the left of the uppermost tile, being the end of our road.  We don't care what's near that horizontal we're attaching (the 0 below it), as it doesn't affect us.  A vertical road can run up the side of our map on the right, and even portions of the left.  At the bottom of our 'road', we have a need for a 'vertical'.

I hope this helps a little.  I'm hoping to add a more thorough understanding of it in the Mapping for Dummies area of the wiki, but my life's been busy... and it would help if I actually finished a map to prove I can write it.

#### wowthebag

• Guest
##### random map part question
« Reply #2 on: May 23, 2007, 06:36:29 pm »
ok this is exactly what i wanted to know, thx