Game Development Reference
In-Depth Information
Figure 11-8 . Artifacts like these indicate a tile-size offset problem
If you did make a mistake and picked incorrect offsets and you don't want to lose the
tilemap you've just spent hours designing, or if you have other reasons to tweak the
tilemap size or tileset size, there's a simple way to do this, but it requires manipulating
the TMX file directly because there's no such option in Tiled itself.
The following trick makes it easy to experiment with various offsets until you get it
just right. Close Tiled if it's currently running and then select the TMX file in your
Xcode project; you'll see that it's displayed as a plain-text XML file. You can edit the
file with any other text editor just as well. At the beginning of the file, you'll find the
map section:
<map version = "1.0" orientation = "isometric" width = "30" height = "30" tilewidth = "54"←
tileheight = "27">
You can edit the tilewidth and tileheight parameters until you've found the
correct offsets for the tilemap. Likewise, if you're having problems determining the tile
size of the isometric tileset you're using, you can modify the tilewidth and tile-
height parameters of the tileset(s):
<tileset firstgid = "1" name = "dg_iso32" tilewidth = "54" tileheight = "49">
<image source = "dg_iso32.png"/>
</tileset>
 
Search Nedrilad ::




Custom Search