Post by Guilect on Apr 16, 2006 20:10:31 GMT -5
Here is some info on the tile map editor BrutusMap included with Brutus2D. This info has been added to the help file and will be included in the next release of Brutus2D. Hopefully this will help users to get going with this application. Hopefully this info will be expanded.
Here is a screen shot the editor window:
"Map size in Tiles"
This defines the overall size of your map. The map size can be as least as big as the screen resolution that you plan on using. Tile maps can be much bigger than the screen resolution. In the above example the map size is 20 x 20 tiles. Each tile is 32 pixels square as seen in "Tile Size". Therefore the overall map will be 20x32 by 20x32 = 640 x 640 pixels. Now since a typical screen resolutio is 640 x 480 some of the map will not be able to be displayed on the screen all at once. But that is way there are scrolling (Mapview) commands in Brutus2D.
"Tile Size"
This is were you need to specify the size (in pixels) of one of your tiles in your tiles set.
(A tile set is a collection of tiles in one file. See the tile set Castle32x32.bmp above.
From a small finite number of tiles in a tileset large maps can be contructed. This saves space as the tile set is a relatively small file
compared to a large map if saved as an image file.)
"Tile Transparent Color"
This is were you specify the background color (also know as the color key) for the tiles in your tileset. This color will be transparent when run in Brutus2D.
"Zoom Factor"
Zooms in or out of the current map view. Useful when working on a really large map.
"Active Layer"
In the map editor there exists two layers of data.
One is called the "Background" this is the graphical, visual layer.
This is were you place your tiles to make your map. See the image above.
The second layer is for storing information. This layer is refered to as "Attributes"
Attributes can be assigned to tiles in your map. Once you have your visual layer designed
you can select the attributes option (see below) and then select an attribute value from the tileset toolbar.
In the image above all the places that a character could walk are made to have the "Pre-defined" value of non-walkable.
Now, the reason the "walkable" place are marked as "non-walkable" is because this map is viewed from the side. If the map you make is meant to be view from the top then the nomeclature would follow. Ultimately, the values that are picked are pretty aribtrary as you can do with any attribute anything you want.
You will also see above the the key has the attribute value of 1 assigned to it and that the clouds have the attribute bvalue of 5 .
This atrributes data layer gets saved along with the visual 'baackground' layer of your map. Then when the map is loaded into Brutus2D you can compare your characters position with the map's location attribute value. So if for example your character is on a location of the map that has an attribute value of '1', then you know he is at the key and you can take appropriate action.
From the readme file included in the BrutusMap folder:
BrutusMap -- Readme.txt
V1.0.0
Controls:
Left-Click on TileSet Toolbar window selects tile under cursor
Left-Click on Main window places selected tile at cursor location
Right-Click on Main window erases tile under cursor
holding Shift and moving mouse over Main window "paints" with selected tile
The data for a map is comprised of 2 sets of data.
The first data set is information which describes the visual look of the
map that you will design.
The second data set is information used to describe attributes of your map.
Attributes may correspond to tiles that cause
your character to lose health (if standing in Lava) or move slower (walking throuhg mud),
and so on.
You select the graphics mode (default) to design the graphical data for your map.
Then you select the attributes mode to describe certain graphics in your map.
To see what is meant, load the sample map "castle.map" located in the examples\tilemap folder.
When you first load it you will see the graphical layout of the data.
Next switch to the attributes mode and you will see the marked un-walkable tiles.
Breifly, how to make a map.
1.) think ahead
2.) set map grid size (it is only recommended to set this BEFORE starting a map)
3.) open a tileset file (*.bmp, *.gif, *.jpg)
4.) enter in the size of a single tile in the tileset you just opened
typical sizes are 16x16, 32x32. The tile is assumed to be square.
5.) design your map graphically (see controls above)
6.) set your map objects attribute data
7.) save your work
when saving your work the data to reconstruct your map is saved,
the object data is saved and the name of the tileset used is also saved.
The path to the tileset is not saved. When opening a map later, it will
be assumed that the required tileset is in the same folder as the map data.
This means you either have to put the tileset where you want it to end up
before you start making a map, or you will need to copy it to the folder with
the map data file later.
Here is a screen shot the editor window:
"Map size in Tiles"
This defines the overall size of your map. The map size can be as least as big as the screen resolution that you plan on using. Tile maps can be much bigger than the screen resolution. In the above example the map size is 20 x 20 tiles. Each tile is 32 pixels square as seen in "Tile Size". Therefore the overall map will be 20x32 by 20x32 = 640 x 640 pixels. Now since a typical screen resolutio is 640 x 480 some of the map will not be able to be displayed on the screen all at once. But that is way there are scrolling (Mapview) commands in Brutus2D.
"Tile Size"
This is were you need to specify the size (in pixels) of one of your tiles in your tiles set.
(A tile set is a collection of tiles in one file. See the tile set Castle32x32.bmp above.
From a small finite number of tiles in a tileset large maps can be contructed. This saves space as the tile set is a relatively small file
compared to a large map if saved as an image file.)
"Tile Transparent Color"
This is were you specify the background color (also know as the color key) for the tiles in your tileset. This color will be transparent when run in Brutus2D.
"Zoom Factor"
Zooms in or out of the current map view. Useful when working on a really large map.
"Active Layer"
In the map editor there exists two layers of data.
One is called the "Background" this is the graphical, visual layer.
This is were you place your tiles to make your map. See the image above.
The second layer is for storing information. This layer is refered to as "Attributes"
Attributes can be assigned to tiles in your map. Once you have your visual layer designed
you can select the attributes option (see below) and then select an attribute value from the tileset toolbar.
In the image above all the places that a character could walk are made to have the "Pre-defined" value of non-walkable.
Now, the reason the "walkable" place are marked as "non-walkable" is because this map is viewed from the side. If the map you make is meant to be view from the top then the nomeclature would follow. Ultimately, the values that are picked are pretty aribtrary as you can do with any attribute anything you want.
You will also see above the the key has the attribute value of 1 assigned to it and that the clouds have the attribute bvalue of 5 .
This atrributes data layer gets saved along with the visual 'baackground' layer of your map. Then when the map is loaded into Brutus2D you can compare your characters position with the map's location attribute value. So if for example your character is on a location of the map that has an attribute value of '1', then you know he is at the key and you can take appropriate action.
From the readme file included in the BrutusMap folder:
BrutusMap -- Readme.txt
V1.0.0
Controls:
Left-Click on TileSet Toolbar window selects tile under cursor
Left-Click on Main window places selected tile at cursor location
Right-Click on Main window erases tile under cursor
holding Shift and moving mouse over Main window "paints" with selected tile
The data for a map is comprised of 2 sets of data.
The first data set is information which describes the visual look of the
map that you will design.
The second data set is information used to describe attributes of your map.
Attributes may correspond to tiles that cause
your character to lose health (if standing in Lava) or move slower (walking throuhg mud),
and so on.
You select the graphics mode (default) to design the graphical data for your map.
Then you select the attributes mode to describe certain graphics in your map.
To see what is meant, load the sample map "castle.map" located in the examples\tilemap folder.
When you first load it you will see the graphical layout of the data.
Next switch to the attributes mode and you will see the marked un-walkable tiles.
Breifly, how to make a map.
1.) think ahead
2.) set map grid size (it is only recommended to set this BEFORE starting a map)
3.) open a tileset file (*.bmp, *.gif, *.jpg)
4.) enter in the size of a single tile in the tileset you just opened
typical sizes are 16x16, 32x32. The tile is assumed to be square.
5.) design your map graphically (see controls above)
6.) set your map objects attribute data
7.) save your work
when saving your work the data to reconstruct your map is saved,
the object data is saved and the name of the tileset used is also saved.
The path to the tileset is not saved. When opening a map later, it will
be assumed that the required tileset is in the same folder as the map data.
This means you either have to put the tileset where you want it to end up
before you start making a map, or you will need to copy it to the folder with
the map data file later.