Getting StartedΒΆ

Tiled maps are stored in TMX, TSX and TX documents, that are based on the XML format. XML organizes data in a tree structure, libTMX loads TMX maps in a C datastructure that is organized just like the source XML document.

As libTMX has an ever-changing API (and ABI) therefore the recommended way to use it is to directly incorporate it in the sources of your project.

For building libTMX, please read the Building libTMX page.


tmx_map *map = tmx_load(argv[1]);
if (map == NULL) {
  tmx_perror("Cannot load map");
  return 1;

Read the Creating a map renderer from scratch article for an in-depth usage of libTMX.