Hi, I've been following the tile map tutorial on the SFML website and so far my tiles load very well, but one improvement I've been trying to make is having the map be loaded from a *.txt file. Essentially instead of having
I want to be able to contain those values in a *.txt file and load them so I don't have to keep recompiling. The problem is that when I create a raw array the amount of characters is fixed and I do not want that. I want to be able to store the characters from the text file into a vector array. I tried doing this but to not avail. I'd like to know how I can go about this and what I need to change either in the load() function to accommodate this.
From what I understand, a vertex array is based on a vector array, so by analogy my raw array would be treated as a vector array thereby dynamically allocating memory as required. Is this correct?
http://www.sfml-dev.org/tutorials/2.1/graphics-vertex-array.phpI've been following the tutorial mentioned in the foresaid link.
tl;dr:
1. I want to load a map from a .txt file while still being able to load tilesets in conjunction thereof. How can I implement this?
2. I want to use a vector array, rather than a raw array. (If necessary)