arrays - Utility for tile-based map generation -
i started working in 2d tile-based game, , how i'm planning generate maps: have array tiles in maps, every element integer represent tile must rendered in position, instance...
int tiles[100] = { 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,1,1,1,1,0,0,0, 0,0,0,1,1,1,1,0,0,0, 0,0,0,1,1,1,1,0,0,0, 0,0,0,1,1,1,1,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, }; as can imagine problem comes bigger maps, 100 tiles , i'll need few thousands...i can't hand.
so, question is: guys know utility can me this? visual tool can draw map , obtain array? i'm pretty sure have seen in past, sadly i'm unable find now.
thanks in advance.
use graphics editor gimp or paint, load resulting image , use pixel data (for example library libgd.
Comments
Post a Comment