Skip to content
/ tmxparser Public
forked from sainteos/tmxparser

C++ library for parsing the maps generated by the Map Editor called Tiled.

License

Notifications You must be signed in to change notification settings

AzP/tmxparser

 
 

Repository files navigation

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

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

About

C++ library for parsing the maps generated by the Map Editor called Tiled.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 53.9%
  • C++ 44.5%
  • CMake 1.6%