The map file
A file which, by an interpreter is converted from tile information to a graphical map.
Here's is an example text file:
When converted into a graphical map:
Syntax
Now first of all the syntax should be fairly obvious (seemingly random numbers):w=x h=y. w = Width h = Height However both the width and the height are deceiving as they start at 0, so therefore the width and height are both one more then they are stated to be. So therefore: w + 1 = Width h + 1 = Height From here on out I will be referring to the width and height as their real values, not the deceiving ones.
Now onto the "Seemingly Random Numbers" they are code for a certain tile in the tileset(s). To understand how these tiles are derived into a numerical system we must first understand the tileset(s) themselves.
The tileset(s) are large images composed of 16x16 tile pieces which when combined together give you tilesheets. The Original map editor's tilesheet size was 128x7778 which in tiles is around 8x486.
Now that we have that covered when can get to the numbering system. In the Map editor the number system is derived by the single interval x axis and the y axis which is multiplied by 25. I know that is a little confusing so here is an example. Say we look at the tileset(s) then the first tile in the upperleft corner would be (0,0) or 0+(0*25)=0, one line down and one to the right would be (1,1) or 1+(1*25)=26.
Division and Loading of Tiles: The way in which the map editor (and presumably the game itself) loads is top to bottom and then left to right. So for example it goes from (0,0) to (0,h) then it goes one to the right to become (1,0) to (1,h). Since the map is w wide and h tall the area (or ammount of tiles in the map) is w*h which for our map is 8*4=34. Now obviously there are more then 34 tiles in our map file. This is due to the fact that there are 3 possible layers to work with, however, as a good mapper knows, only the base and mid layer work correctly.
Tips and Tricks: Adding rows or columns to our map: Column(Left Side):To do this to any side of the map with our current map editor, first you must determine the height of our map. Then add that many "0:"s to the begining of your map. Then after w*h tiles add it again and repeat. on a 1x1 map it would go from:
to
In some map editors it is possible to show individual layers:
The base layer of our map:
The mid layer of our map:
