0
\$\begingroup\$

How does one load .tmx files from Tiled into a SFML game?

\$\endgroup\$
2
  • \$\begingroup\$ Keep in mind to accept one answer, which both increases your reputation and helps you get help in the future if people see, that you approve of given hints and answers! \$\endgroup\$ Feb 15 '13 at 19:56
  • 1
    \$\begingroup\$ yeah sure.. i got it .. \$\endgroup\$ Feb 17 '13 at 18:36
2
\$\begingroup\$

In my opinion the tmx-parser is the most robust library available which I have been using, too. It even supports compression which is the default option in Tiled.

\$\endgroup\$
1
  • \$\begingroup\$ This, and if that does not please you, you can still export from Tiled to other formats like JSON and parse that, there is a lot of parsers for JSON. \$\endgroup\$
    – opatut
    Feb 15 '13 at 20:19
0
\$\begingroup\$

TMX is an xml-based format. You can parse it with any XML-parsing library to extract the level data and convert it into your internal format.

\$\endgroup\$
1
  • \$\begingroup\$ okay ... got it \$\endgroup\$ Feb 14 '13 at 10:29
0
\$\begingroup\$

Two other options you have are STP and sfml-tmxloader

As for the first option I have not tried it. However I've used sfml-tmxloader and found it to be very simple to use, which is also the one I recommend.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .