Introduction

A propos de Tiled

Tiled est un éditeur de niveau en 2D qui vous aide à développer le contenu de votre jeu. Sa principale caractéristique est d’éditer des cartes de tuile aux formes variées, mais prend également en charge le placement d’image libre ainsi que des moyens efficaces d’annoter votre niveau avec des informations supplémentaires utilisées par le jeu. Tiled se concentre sur la flexibilité générale en essayant de rester intuitif.

En termes de cartes de tuile, il supporte les couches de tuile rectangulaires et droites, mais également les couches de tuile isométriques, isométrique en quinconce et hexagonal en quinconce. Un jeu de tuile peut être soit une seule image contenant plusieurs tuiles, ou peut aussi être une collection d’images individuelles. Afin de supporter certaines techniques de simulation de profondeur, les carreaux et les couches peuvent être décalés par une distance personnalisée et leur ordre de rendu peut être configuré.

The primary tool for editing tile layers is a stamp brush that allows efficient painting and copying of tile areas. It also supports drawing lines and circles. In addition, there are several selection tools and a tool that does automatic terrain transitions. Finally, it can apply changes based on pattern-matching to automate parts of your work.

Tiled also supports object layers, which traditionally were only for annotating your map with information but more recently they can also be used to place images. You can add rectangle, point, ellipse, polygon, polyline and tile objects. Object placement is not limited to the tile grid and objects can also be scaled or rotated. Object layers offer a lot of flexibility to add almost any information to your level that your game needs.

D’autres choses qui valent d’être mentionné sont le support d’ajout de format de tileset ou de carte au travers de plugins, la mémoire du tampon de tuile, le support d’animation de tuile et l’éditeur de collision de tuile.

Pour Débuter

Créer une Nouvelle Carte

When launching Tiled for the first time, we are greeted with the following window:

Tiled Window

Fenêtre de Tiled

The first thing we’ll do is to start a new map with File -> New -> New Map… (Ctrl+N). The following dialog will pop up:

New Map

Nouvelle carte

Here, we choose the initial map size, tile size, orientation, tile layer format, tile render order (only supported for Orthogonal maps) and whether the map is infinite or not. All of these things can be changed later as needed, so it’s not important to get it all right the first time.

After saving our map, we’ll see the tile grid and an initial tile layer will be added to the map. However, before we can start using any tiles we need to add a tileset. Choose File -> New -> New Tileset… to open the New Tileset dialog:

New Tileset

Nouveau Jeu de Tuile

Click the Browse… button and select the tmw_desert_spacing.png tileset from the examples shipping with Tiled (or use one of your own if you wish). This example tileset uses a tile size of 32x32. It also has a one pixel margin around the tiles and a one pixel spacing in between the tiles (this is pretty rare actually, usually you should leave these values on 0).

Note

We leave the Embed in map option disabled. This is recommended, since it will allow the tileset to be used by multiple maps without setting up its parameters again. It will also be good to store the tileset in its own file if you later add tile properties, terrain definitions, collision shapes, etc., since that information is then shared between all your maps.

After saving the tileset, Tiled should look as follows:

Tileset Created

Tileset Created

Since we don’t want to do anything else with the tileset for now, just switch back to the map file:

Tileset Usable on the Map

Tileset Usable on the Map

We’re ready to select some tiles and start painting! But first, let’s have a quick look at the various layer types supported by Tiled.

Note

Much of the manual still needs to be written. Fortunately, there is a very nice Tiled Map Editor Tutorial Series on GamesFromScratch.com. In addition, the support for Tiled in various engines and frameworks often comes with some usage information.