Skip to content
jmf edited this page Mar 14, 2013 · 1 revision

What are tiles?

Tiles are the static world blocks. They are the floor, the walls and the ceiling. Tiles can also be switches and be scripted.

What is a tileset?

The tileset is a file in which the tiles and sprites are declared and scripted.

How to make a custom tile(set)?

Static tiles

A static tile is defined like this:
[1]
img: sandstone;
shading:true;
This creates a solid block with the texture sandstone.png with enabled shading and the tile number 1. The tile number is used to make maps.
There are a few options that are aviable for a tile:
img:
The filename of the tile image. The file is located in data/tilesets//tiles.
shading:
Can be true or false. If true, the tile is shaded.
solid:
Can be true or false. true means solid, false means that the player can walk through it.
jumping:
Can be true or false. If true, the object can be climbed like a ladder/rope if used with solid:false.
slowness:
When in the object, the player is slowness: slower. For this the file must have solid:false, of course.
Instead of false and true, also 0 and 1 can be used.

Scripted tiles

Scripted tiles are declared like static tiles, but they have got an event and script part. [3]
img:spikes;
on_contact:
play_sound(spikes)
player.die();
solid:0;
This makes a spike tile. It is not solid. If it was solid, the on_contact function wouldn't work. If the player touches it, the sound "spikes.ogg" in data/tilesets//sounds and the player dies. There are a few possible events: TO BE CONTINUED