-
Notifications
You must be signed in to change notification settings - Fork 2
Tilemaps
M4T1A5 edited this page Oct 31, 2014
·
3 revisions
The engine has support for loading tilemaps created with Tiled. NOTE: as of writing the engine only supports uncompressed xml layer format.
Most of the Tiled map format is supported including:
- Loading and drawing
- Object groups
- Properties
- Multiple tilemaps
- External tilemap files(Tiled will generate these occasionally)
Loading tilemaps is pretty straightforward.
TMX::Map map;
map.LoadFromFile("example.tmx");
Maps inherit from GameObject
so you can use the transform component just like with regular GameObject
.
If you have problems loading the map open it in a text editor and look for <tileset>
tags. Inside that look for <image>
tags and make sure the source image path is relative to the map file(If tileset tag only has a source property to a .tsx file you will find the image tag there).