Home

Awesome

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

Dependencies

CMake options

USE_MINIZ         "Use miniz.c instead of zlib (default: OFF)"
BUILD_SHARED_LIBS "Build shared libs, otherwise static libs. (default: ON)"
BUILD_TINYXML2    "Build tinyxml2 as external project (default: OFF)"
BUILD_TESTS       "Build tests. (default: OFF)"
BUILD_DOCS        "Build documentation. (default: OFF)"

Installation

tmxparser uses CMake, and the standard CMake build flow works as you'd expect. It's also alternatively available in vcpkg.

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.

mkdir build
cd build
cmake .. -DBUILDTESTS=ON
make
./run_tests