# C bindings for reading TMX/TSX files

**URL:** <https://discourse.mapeditor.org/t/c-bindings-for-reading-tmx-tsx-files/1876>\
**Category:** Questions\
**Created:** [December 2, 2016, 7:43pm UTC](https://discourse.mapeditor.org/t/c-bindings-for-reading-tmx-tsx-files/1876 "2016-12-02T19:43:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bsdero](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@bsdero](https://discourse.mapeditor.org/u/bsdero)\
**Post date:** [December 2, 2016, 7:43pm UTC](https://discourse.mapeditor.org/t/c-bindings-for-reading-tmx-tsx-files/1876/1 "2016-12-02T19:43:52Z")

</div>

Hi,

I don’t know if this is the correct place to announce this.

I got C bindings for read TMX/TSZ files using a very simple interface.  
It uses mini-XML libraries and support most of the features ot Tiled,  
including tiles in XML, CSV, Base64 with and without compression, object groups  
and so on.

Code should compile in all platforms with make and a C compiler. No weird additions.

It does not load tiff, gif, png files or things like that, just read, parses XML tiled files and fill in a data structure. Your game should use the tmx structure data to load the resources.

If somebody is interested i can upload a tar or zip file with code to play with. Code will be licensed with gpl or such.

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [December 10, 2016, 10:03pm UTC](https://discourse.mapeditor.org/t/c-bindings-for-reading-tmx-tsx-files/1876/2 "2016-12-10T22:03:50Z")

</div>

> [@bsdero](#):
>
> I don’t know if this is the correct place to announce this.

In the Tiled development topic wasn’t the best place, so I’ve moved it into its own topic now. 🙂

> [@November 2016 development updates](https://discourse.mapeditor.org/t/november-2016-development-updates/1817/3):
>
> If somebody is interested i can upload a tar or zip file with code to play with. Code will be licensed with gpl or such.

Please don’t hesitate to upload the code to [GitHub](https://github.com/) for example, so that it may be useful to some people. It can also be linked from the [Libraries and Frameworks](http://doc.mapeditor.org/reference/support-for-tmx-maps/) page in the documentation.

How does your solution compare to [tmx](https://github.com/baylej/tmx/) (another C library for loading TMX files)?

---

<div class="post-metadata">

**Author:** ![rjansen](https://avatars.discourse-cdn.com/v4/letter/r/e47c2d/32.png) [@rjansen](https://discourse.mapeditor.org/u/rjansen)\
**Post date:** [August 1, 2019, 2:30pm UTC](https://discourse.mapeditor.org/t/c-bindings-for-reading-tmx-tsx-files/1876/3 "2019-08-01T14:30:46Z")

</div>

Did the code ever get uploaded to GitHub? I am interested in any case.

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [August 1, 2019, 3:05pm UTC](https://discourse.mapeditor.org/t/c-bindings-for-reading-tmx-tsx-files/1876/4 "2019-08-01T15:05:30Z")

</div>

@bsdero never made another post, so I guess not. Did you give [tmx](https://github.com/baylej/tmx/) a try?

---

<div class="post-metadata">

**Author:** ![bsdero](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@bsdero](https://discourse.mapeditor.org/u/bsdero)\
**Post date:** [August 1, 2019, 7:11pm UTC](https://discourse.mapeditor.org/t/c-bindings-for-reading-tmx-tsx-files/1876/5 "2019-08-01T19:11:05Z")

</div>

Hi,

my HD had a failure and I lost the source code. Sorry about that, guys.
