Quote (Foxic @ Aug 15 2014 05:59pm)
So what's the best way to store the tiles? Crop every single one and put it into a 2d array? E.g: if one of the tile sheets has 30 tiles across and 30 down, I should make an array[30][30]?
How do I design maps later? Keeping track of tiles seems tough when there are 1000+
If you have that much art, I don't see another way of doing it.
It probably seems obvious, but store art that will be referenced sequentially close to one another in the same array. There may be other data structures, without a lot more detail it's difficult to say.
Storage in an array makes sense if you're going to draw environments that make use of nested loops and need to fill out square areas. If not (and it's more or less linear), there's no reason to use this data structure. It all depends on context!