0
\$\begingroup\$

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

\$\endgroup\$
  • \$\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\$ – Christian Ivicevic Feb 15 '13 at 19:56
  • 1
    \$\begingroup\$ yeah sure.. i got it .. \$\endgroup\$ – dineshswamyp 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\$
  • \$\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\$
  • \$\begingroup\$ okay ... got it \$\endgroup\$ – dineshswamyp 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\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.