After you create the object layer you can create objects. In our case we created two objects layers, one for snails and the other for the hedgehog. You now set the name for the object layer. In order to create an object layer in Tiled you need to open the Layer menu and click “Add Object Layer”. In our application we place snail objects and the hedgehog object on the map and then using Cocos2d-x we read their position and create sprites. This means that they are not displayed as images, but they store the position and some properties of the element. We created one level called “collidable” and placed the lettuce inside this level.Īs mentioned before, the snails and the hedgehog are objects. That is why we decided that there will be no additional layers. In RunSnailRun there is only one type of collision object, the lettuce. You can specify which tiles are not to be crossed by the player by placing transparent tilesets on these tiles. You will then create another, separate layer with a transparent tileset. The other way is to create one layer for each type of terrain, so there will be a layer of trees, a layer of rocks, etc. Cocos2d-x can read the tiles’ positions from specified layers and you can check if the player wants to move onto a collidable tile and you can stop him. In the first approach you can create a collidable layer in which you will place all the tilesets like rocks, rivers, trees that will be collidable. Rectangular select: You can use this to select an area so that all the modifications will only be applied inside this areaĪfter you create the background you can also add some collision objects on the map, so the player will not be able to walk all around the map.Eraser: This will erase the selected tile.Bucket Fill Tool: With this option set you will fill the whole map with the specified tileset.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |