Skip to content

Creating a simple map with tiled

Stefan Beller edited this page Apr 8, 2012 · 1 revision

While Tiled is meant to be easy to use, it has a learning curve like anything else. This tutorial is meant to help flatten the curve. In this tutorial we'll get you started on creating a new map, creating a tileset, editing and finally, saving.

Table of Contents

A brave new map

Let's begin by creating a new map from File -> New.... Once the New Map dialog appears, we will set the initial dimensions and the orientation. We will create a standard, orthogonal map as an example.

The dimensions, or size in tiles, of the map will be 32 tiles wide by 32 tiles high for our example. The dimensions of the individual tiles will be 24x24. This is the size of the tiles we will be using later, it is important to get this right when you start a new map. Click OK.

We are now presented with the main Tiled editing window. As you can see there are no tiles and only one layer, which is selected. We now need to bring in a tileset for our map. Maps can have any number of tilesets. For us, a single internal tileset will do. From the Map menu, select New Tileset...

On internal and external tilesets

Tilesets are not necessarily tied to a specific map. In Tiled, tilesets can be independent resources, which the maps can reference. By default, when you create a tileset, it'll store its definition in the map. If you want to use the same tileset in multiple maps, you can export it to a .tsx file and import the tileset into other maps you create.

Note: When we talk about a tileset, we mean the set as defined by the tileset element either within a map file or stored in a .tsx file, not the tileset image. In both cases the image is kept as a separate file and referenced from the tileset.

Adding a tileset

Once at the New Tileset dialog, we will click Browse... in order to choose our tileset image. Select the file at examples/sewer_tileset.png. The name of the tileset is automatically filled in based on the name of the image file, but you can tweak it to your needs. Check the Use transparent color checkbox since this tileset uses pink to indicate transparent areas (an optimization from the old days). Since we have no frame or grid around the tiles in the set image, we leave Margin and Spacing on 0. Click OK.

The final steps, drawing and saving

Now that a tileset has been added to the map, you will notice it is displayed in the Tilesets panel. You can place this panel in a convenient spot by dragging its title bar.

Select a tile in the tileset panel by clicking it. With a tile and the stamp brush selected, you can start drawing tiles on your map. Also try out the fill, eraser and tile selection tools.

Hint: You can also right-click on the map to select a tile. And whether you're using the map or the tileset view, you can click+drag an area of tiles to paint them all at the same time.

Finally save your map using File -> Save. Choose a name like tutorial1.tmx.

Category:Tutorial