How could one possibly integrate tile based .TMX level files created by the Tiled Map Editor in OpenFrameworks?
this is a super generic question. maybe we could give a more helpful response if you said exactly what you were planning on doing?
afaict tmx files are xml, which you can use ofxXmlSettings to load.
Sorry about the vague context. I’m interested in using openframeworks to load tile map (.TMX) files in an openframeworks program so I can make levels for a 2d platformer game using the tiled map editor. Also, is there a way to test collisions between the player object and ground tiles?
support for .tmx isn’t built into OF directly, but you can definitely hack OF to make this happen. i recommend starting with addonsExamples/xmlSettingsExample to learn about loading/saving xml. then make a copy of the project, and try modifying it to load the .tmx file instead.
for testing collisions you might want to check out the ofRectangle class which has a method inside(ofPoint point) which will tell you whether a point is in side the rectangle or not.
Any news on this topic ?
could be nice to use this tool with OF : http://www.mapeditor.org/
This thread is rather old, but someone might be still interested:
There is c++ tmx-parser http://code.google.com/p/tmx-parser/
Thank you for the reply. Definitely still interested.