Load TiledMap in Array


Is there a way to load the numeric values of a tiled map into a integer array?
I want to use it as a “collision detection” and maybe some other stuff after it’s loaded.

I saved the .tmx in CSV-encoding so it is kinda like an array in the file.

Hi Mr.Minemeet…

To answer your question, you would have to dimension your array to the appropriate number of sections to accommodate the numeric values in the TMX file.

Since reading a TMX file would be similar to that of a CSV, you would have to write the code to read a line of that file, separate out the values and then put them into the array properly.

If you are asking if there is a pre-built function to do this, you may try investigating MonoGame.Extended, which I believe supports loading TMX files…