Tile Studio

Tile Studio is a Windows-only editor for graphics and level data of tile-based video games. The application combines a bitmap editor for creating graphics and a map editor for designing level maps. A notable feature, distinguishing this tool from the approach of similar programs like Mappy and Tiled which define their own general map file format, is export of assets to arbitrary files through a comprehensive and sophisticated scripting language.

Tile Studio was created by Mike Wiering / Wiering Software.

Defining the Output Format

Asset export scripts have a .TSD file extension and a line-oriented syntax. On the website, there are examples of .TSD files for use with several programming languages and libraries (C, Delphi, Java, BlitzBasic, etc.). The user is expected to write a specific .TSD file for each project.

The output consists of any number of text files, binary files, or images (.bmp or .png). For example, a tileset can be exported as a bitmap containing all the tiles (or only the tiles/tile combinations that are actually used in the maps), or in it can be exported pixel by pixel to a text file with RGB values.

The following example creates a .bmp file with graphics and a map file in a custom text format. Notice the looping constructs and the placeholders, e.g. #tileset iterates over tilesets and populates TileSetIdentifier with the name of each tileset.

#tileset
#tilebitmap tileset_<TileSetIdentifier>.bmp 320
#end tilebitmap
#end tileset

#file map_<ProjectName>.tsmap
<TileSetCount>
#tileset
tileset_<TileSetIdentifier>.bmp
<TileSetNumber>,<TileWidth>,<TileHeight>,<HorizontalTileCount>,<VerticalTileCount>
<TileSetBitmapWidth>,<TileSetBitmapHeight>,<TransparentColorR>,<TransparentColorG>,<TransparentColorB>
<MapCount>
#map
<MapNumber>,<MapWidth>,<MapHeight>,<ScrollX>,<ScrollY> 
#mapdata
\n<TileNumber>,<Bounds>,<MapCode>
#end mapdata
#end map
<SequenceCount>
#sequence
<SequenceNumber>
<SequenceLength>
#sequencedata
\n<TileNumber>
#end sequencedata
#end sequence
#end tileset
#end file

License

Tile Studio is free open source software under the Mozilla Public License (with the exception of the .tsd files and any code that is copied to the output, that is public domain). So Tile Studio can be used for projects that are under any license.

This article is issued from Wikipedia - version of the 6/14/2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.