FANDOM


A tileset is an image file which contains several graphics used by tiles.

LocationEdit

Tilesets are saved in, relative to the CS2D dir, /gfx/tiles.

Tile IDsEdit

Dust numbered

A part of the tileset dust.bmp for the map de_dust, with the tile IDs written on the tiles.

When loading a tileset into a map, CS2D assigns each tile a tile ID (or sometimes called "frame"). Tile IDs range from 0 to 255. The topleftmost 32×32 area of the image is considered tile #0, then it looks on the area 32 pixels to the right from it; this is tile #1 and so on. If CS2D finishes the row of tiles, it looks for the next row and looks on the leftmost 32×32 pixel area of that row. CS2D repeats this until the whole tileset has been loaded.

TransparencyEdit

When using as a 24-Bit Bitmap, all magenta (Red: 255, Green: 0, Blue: 255) pixels are rendered transparent by CS2D, meaning, the map background becomes visible instead. For example, tile #0 of dust.bmp (tileset of de_dust) becomes entirely transparent. However, semi-transparent pixels or tiles are not possible with a 24-Bit Bitmap.
When using a Portable Network Graphic instead, CS2D uses the semi-transparency of the image, so there could be tiles which shows half the tile, half the background, for example. In this case, magenta pixels are rendered magenta and not transparent.
As a convention, in most tilesets the tile #0 is entirely transparent for the background.

Image FormatEdit

A tileset image must be either a 24-Bit Bitmap (BMP) or a Portable Networks Grahpic (PNG).
PNG is probably the better choice because it has two major advantages:
  • way smaller file size than BMP (important for online play)
  • semi-transparency (important for, uhhm, fancy graphics)

RestrictionsEdit

A tileset

  • must have a width and a height which are both divisible by 32.
  • should have no more than 256 tiles. (tiles after #255 are ignored)
  • must be either in the 24-Bit Bitmap (BMP) or in the Portable Networks Graphic (PNG) format.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.