A challenge with tiles..
Posted: Thu Mar 26, 2020 10:17 am
Let's say that i have an image, which size multiple of 8 where I want to store all my tiles.
For instance 320x320. That imagine contains 1600 tiles. (I know the limit of 1310, this is just for example).
But in the game each bakground element (t1, t2, t3, ...) made up of 5x5 tiles, as I splitted the image.
1) How can I load all at once and then refer to each tile for drawing?
2) Is there a way to have an array used in the resources file so, even if I have different graphics files, I can load in ANIM[1], ANIM[2], etc... ?
For instance 320x320. That imagine contains 1600 tiles. (I know the limit of 1310, this is just for example).
But in the game each bakground element (t1, t2, t3, ...) made up of 5x5 tiles, as I splitted the image.
1) How can I load all at once and then refer to each tile for drawing?
2) Is there a way to have an array used in the resources file so, even if I have different graphics files, I can load in ANIM[1], ANIM[2], etc... ?