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\$ Commented Feb 15, 2013 at 19:56
  • 1
    \$\begingroup\$ yeah sure.. i got it .. \$\endgroup\$ Commented Feb 17, 2013 at 18:36

3 Answers 3

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\$ Commented Feb 15, 2013 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\$ Commented Feb 14, 2013 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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.