C++ TMX File Parser - Reads Tiled Map Editor files
C++ Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
libs
src
test_files - replicated test_xml_file but with different layers Dec 23, 2014
tests
.cproject
.gitignore - update gitignore Dec 2, 2014
.gitmodules
.project
LICENSE - added license info Dec 5, 2014
Makefile
README.md
main.cpp
valgrind.log - added valgrind log for diff at later dates Nov 26, 2014

README.md

libtmx-parser

Tested Operating Systems

  • Ubuntu 14.04
  • Android 2.2+/3.X/4.X

Features

  • Parses tiled-qt 0.10.2 maps, version 1.0 tmx files
  • Simple, returns a struct filled with map data
  • Lightweight
  • Using TinyXML2
  • Parse XML, CSV or Base64 layers (no compression yet)
  • Easy to drop into a project

TODO

  • Unit/Coverage tests
  • Parse compressed layer tile data
  • Parse terrain
  • Check for NULLs and report errors on certain 'required' attributes

COMPILING

  • See Makefile for an example

Requires libs

This library is included as a subrepo. You can get it by running the following in this cloned repo:

  • git submodule update --init --recursive
  • TinyXml2 is being used, as it is very lightweight and game dev friendly

Required files

  • tmxparser.h/.cpp
  • base64.h/cpp
  • tinyxml2.h/.cpp

Required flags

-std=c++11

USAGE

tmxparser::TmxMap map;
tmxparser::TmxReturn error = tmxparser::parseFromFile("example.tmx", &map);