Stendhal:Tileset specifications: Difference between revisions
imported>Kiheru →Perspective: embedded the example images like they used to be before the wiki move |
imported>Kiheru →Perspective: embedded the example images like they used to be before the wiki move |
(No difference)
| |
Revision as of 20:18, 25 August 2009
Any new map graphics should comply with these specifications.[1] (Yes, there are several old images that do not comply; Those will be fixed eventually).
General
The tilesets used for the maps are in tiled/tileset directory in the stendhal source. Give your image a descriptive name in lowercase letter and use underscore between words. You don't need to repeat information in the image name that's already given by the directory name. The current directory hierarchy is here.
- The license must be GPL, or compatible, such as public domain.
- Tile size is 32x32 pixels. Therefore, the dimensions of all tilesets must be some multiple of 32.
- File format is PNG, 8 bits/color.
- Use only fully opaque, or fully transparent pixels. Currently the client treats any semitransparent pixels as fully transparent, for performance reasons.
- unlike items, tile images do not use border lines
Perspective
The object is to appear as viewed directly from the south, at a 45 degree angle to the ground plane. There's no distance effect. Interiors walls are an exception to this.

The effect of the view angle is that lengths in north-south direction are scaled by 1/√2 (≈0.71). Likewise for all heights.
Example of scaling north-south length in the well.
Interior walls
Interior walls are viewed directly from above, and with faked distance effect. See the current wall images for examples.
Light
Light comes slightly from the left (roughly south south west), and above of the viewer.
Because semitransparent pixels can not be used, shadows outside the main shape of the image must be done with opaque color. RGB color #353535 is fairly common, but you can use something else too.
Adding tiles to existing images
- If the image has completely transparent tiles, you can safely use those for new tiles.
- Never increase the width of an image, that is used by any map, and is higher than 1 tile! The tiles would get renumbered, and every map using tiles from row 2 or below, would get broken.[2]
- You can add more rows to images, below the old ones.
- When you change the size of an old tileset image, you need to run 'ant updatemaps'. Alternatively you can load and save all the maps that use that particular image in the map editor. [3]
- Preferably do not change the size of images in the cvs, unless someone has already broken the cvs clients compatibility with the standard server. Many developers use the cvs client in the main server too, giving it more testing than it would get otherwise. Usually adding the images is not so urgent that it can not be postponed to a better moment.
Other
- Try to use existing patterns and colors, when that's reasonable. It makes the job of the map makers easier when the images can be easily combined.
- Animate images that should move, like fire or water.
- Consider making your images so that by using individual tiles within image, several sizes can be achieved. While an individual image can often be made look better without the limitation of tiling parts of it at 32 pixel boundaries, resizable ones can add more variety to the maps.
http://img141.imageshack.us/img141/2824/rubblesampleqd6.png Example: rubble can be resized in both directions.
Notes
[1] There are valid reasons to break most rules, but do not break a rule unless you understand the reason for it (and, by extension, the reason why it does not apply to your particular image).
[2] Strictly speaking, it's possible to add to the width too, while keeping the tile numbering constant. Don't do that unless you really know what you are doing.
[3] It's also possible to run MapUpdater.class on the relevant maps, either manually, or with a script. If you don't know how to do this, just use 'ant updatemaps'.