Hi there! I have a problem with using my map in c++ code with the help of sfml and tinyXML(I’m doing 2d platform game). My code for extraction map from xml file supports only png file. How to change using tsx file to png?
TSX is not your image file, it’s the XML file, containing data about the tileset. Your actual tile image is probably already PNG.
Are you saying that your parser only supports embedded tileset data, and expects the TSX’s data to be in the TMX, including the location of the PNG? In that case, export your TMX file with “embed tilesets” enabled (Preferences -> General, check “Embed tilesets” under “Export Options”, then Export As… your map. Save it with another filename so that you can keep your non-embedded, easily editable working file.)
Oh, thank you, I’ve already solved this problem, but I have another one. My program read a map, but don’t want to work with actually png file. It can get all hidden objects, but coudn’t draw tiles on the screen.
No errors has been written, so I don’t know what to do(
Are you actually drawing any object? Are you assigning the tile data to something that can be drawn, and assigning the PNG image to use as a texture?
Really though, this is beyond the scope of Tiled, Tiled is just an editor. It’s up to you and your engine to decide how to draw tilemaps. If you’re using an existing engine, you should ask its community. If you’re writing an engine from scratch, then TIGSource may be a good place to ask.