Scrolling Game Development Kit UI Help |
This dialog is where Tilematch objects are defined. A Tilematch object is used in the map editor to quickly and easily construct coherent structures. This is accomplished by defining which tiles belong in which locations near the exterior edges of structures.
The Tilematch object has 15 internal categories of tiles. These 15 categories cover all the needs to match neighboring tiles for any structure that is always at least 2 tiles thick (minimum of a 2-by-2 structure). Each category may contain a number of tiles, one of which is chosen randomly at the time the matching is done. The ability to contain multiple tiles in each category only exists for variety; a perfectly good Tilematch can be defined with only one tile in each category. The list below lists all 15 categories in order from top left to bottom right, and describes when the category is used:
Note that when the tile matching dialog is initially displayed, it contains some simplistic graphics in each of the categories. These are meant only to represent the kind of tile that would belong in that slot and do not indicate any content. Once a slot is filled in with one or more tiles, the first tile in the category associated with that slot will be used to represent that slot instead of the simplified graphic. The tile may appear somewhat distorted because it is stretched or condensed to fit inside the slot's representation. Tiles can be added to a category either by dragging the tile from the "Tiles available in tileset" box directly to the slot for the category, or by clicking the slot and dragging the tile into the "Tiles in current slot" box.
When using a Tilematch in the map editor, it always uses a 2-by-2 "brush" so that it's not possible to draw an incoherent structure. (This can, however, occur when using the Tilematch eraser.) The tiles are selected based on the surrounding tiles on the map. A 4-by-4 square may be altered to match the 2-by-2 block being drawn. Each individual tile in the 4-by-4 area is selected based on the surrounding tiles according to the rules above. The Tilematch object forces the middle 4 tiles to be the center tile. Then it performs the matching, changing these 4 center tiles to match their surroundings if necessary.
The matching does not end there. Because some tiles around the edge of the 4-by-4 area may need to be altered to match the center 4 tiles, all their neighboring tiles need to be considered in order to determine exactly how they match their surroundings. Therefore in the end, a 6-by-6-tile area is considered in drawing one click of Tilematch. So starting at the center, there are 3 layers of effect that using a Tilematch has:
This said, you may understand the need for one more category. "Unclassified tiles in this group" is a category that can be used to indicate tiles (in layers 2 and 3 as described above) that match up with tiles in this Tilematch, or can be altered because they are visually part of the same kind of structure, but which are never drawn onto the screen by this Tilematch. They are considered part of the Tilematch, but are not drawn under any circumstances by the Tilematch itself. For instance, if you have one Tilematch object that has square corners (call it "SquareMatch") and another that has sloped corners (as depicted in the screenshot above -- call it "SlopeMatch"), you would probably want to add the sloped corners to the "Unclassified" category in "SquareMatch" and add the square corners to the "Unclassified" category in "SlopeMatch". This allows two similar looking Tilematches to join together seamlessly.
To remove a tile from a category, select the appropriate slot and drag the tile from "Tiles in current slot" or "Unclassified tiles in this group" to "Tiles available in tileset".
Use the Ctrl and/or Shift keys when clicking the tiles to select multiple tiles or ranges of tiles.
Note: Version 1.4 of the Scrolling Game Development Kit supports very large tiles (up to 128x128 pixels). However it was assumed to be unnecessary to include (nice) support for huge tiles in this tile matching dialog. Tile matching is generally applied to relatively small tiles. Huge tiles are generally used to display entire images and not just pieces of an image that require automatic matching. Therefore the windows that show the tiles in this dialog are relatively small. You can still use 128x128-pixel tiles in this dialog; it's just not designed to look as nice as tile displays elsewhere.