3

I tried to load a .tmx (Tile Map Editor) file into my project but I'm getting this error:

Cannot autodetect which importer to use for "Level1.tmx" There are no importers which handle this file type. Specify the importer that handles this file type in your project.

2
  • 1
    More context, please. What is a tmx file, and what are you trying to import it into? Feb 24, 2011 at 6:01
  • This is the second post I have seen in as many days with the title "Software Engineer". It's not your title we are interested in, but instead a short description of the problem. Feb 24, 2011 at 6:01

4 Answers 4

2

XNA does not load the file by default. There is a full TMX Map Loader for XNA projects located here http://windowsphonedevelopments.com/tmx-map-loader-xna-1-0/

TMX Map Loader XNA is a full XNA content pipeline library that allows you to load and process the data from the TMX source asset file and output the data as an intermediate format at design time (output to an .xnb file).

1

XNA does not support Tile Map Editor files by default. It is possible to load them into your project however. Some information about a custom loader can be found here:

http://nerdculture.org/2009/07/14/tiled-maps-for-xna-full-support-for-the-tiled-map-xml-specification/

The post is a bit old so I'm not certain it's going to work with the latest version of XNA, but it's definitely a good starting point.

1

i found your question & this answer while looking for the same thing:

TiledSharp

A .NET C# library for importing Tiled TMX tile maps

https://github.com/marshallward/TiledSharp

0

I found a tool called XTiled which handles loading and rendering of .tmx files from start to finish.

Here's the website: https://bitbucket.org/vinull/xtiled Example/Tutorial from the author: https://www.youtube.com/watch?v=qd0Yh50SPL4

With Tiled Sharp, I was able to load the tmx into memory, but there is no api for actually rendering tiles. You have to do it all yourself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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