Game Development Reference
In-Depth Information
You can also zoom the tilemap. If you have a mouse with a scroll wheel, hold down the
Command key and roll the scroll wheel to zoom in and out. Alternatively, you can also
zoom in and out by pressing the Command key with either the plus and minus sign, re-
spectively.
You'll spend most of your time picking a tile from the tileset and drawing it onto the
tilemap with the Stamp Brush selected. Placing tile by tile, you'll create your tile-based
game world.
You can also edit tiles in multiple layers by adding more layers in the Layers view.
From the menu, choose Layer Add Tile Layer to create a new layer for tiles. Using
multiple tile layers allows you to switch out areas of the tilemap in cocos2d. In the
TileMap01 example project, I use it to switch parts of the map between winter and
summer.
You can also choose Layer Add Object Layer to add a layer for adding objects.
There are two types of objects: the regular objects are simply rectangles that you can
place, and the other type of objects are tile objects that let you freely place a tile any-
where on the map, without snapping to the tile grid. You can use the rectangle objects
to annotate the map with custom information, such as spawn points, teleport locations,
or trigger areas. The tile objects are most commonly used to place smaller things like
swords, flowers, candles, and other items directly onto the tile world.
To work with objects, additional buttons are available in the Tiled toolbar: Select Ob-
jects (hotkey S), Insert Objects (hotkey O), and Insert Tile Objects (hotkey T). To insert
a rectangle object, click the Insert Objects icon and click in the tilemap world to create
point objects (rectangles with zero width and height), or click and drag down and to the
right to create a rectangle. To insert a tile object, click the Insert Tile Objects icon, se-
lect a tile from the tileset, and then click the tilemap world to add a new tile object.
Some functionality in Tiled is hidden in context menus. For example, you can delete
the rectangle objects I just mentioned by right-clicking them in the Tilemap view and
selecting Remove Object. Note that you also need to have the object layer highlighted
in the Layers list view for the context menu to appear.
You can also edit properties of objects, layers, and tiles by right-clicking them and
clicking the corresponding Properties menu item. One use for that is to create an addi-
tional tile layer by using Layer
Add Tile Layer. This will be a layer used to tell the
Search Nedrilad ::




Custom Search