C++11 library for parsing the maps generated by the Map Editor called Tiled.
C C++ CMake
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

tmxparser

Build Status

This is a C++11 library for parsing the maps generated by Tiled Map Editor.

The TMX format is based upon XML and may contain compressed and encoded tile data to save memory and reduce file sizes. This parser uses the TinyXML2 library and its DOM interface to parse TMX files.

An example file is provided to understand how to use the library.

Features

  • Conformity with the TMX specification page. (Current Version Support is 1.0)
  • Decodes and decompresses tile data.
  • Can parse properties as integers, real numbers, and literals (strings).
  • Can parse the map file when stored in memory.
  • Does not rely on any graphics library.
  • Animated tile support.
  • Group Layer support.

Dependencies

  • zlib
  • TinyXML2 >= 6.0.0

Installation

mkdir build
cd build
cmake ..
make
sudo make install

To Run The Tests

After make, there will be several artifacts within build/. One of which is called run_tests. The test runner expects to be in the test/ folder so the links to reference files for the tests will be where it expects them to be.

...
make
sudo make install
mv run_tests ../test/
cd ../test/
./run_tests