I want to load a map from text tile, but the coordinates are not aligned to a grid. So, a map of tiles is not useful for me. I write, in a text file (manually), the positions of the sprites.
Something like this:
name:path:x:y
sprite1:resources\sprite1.png:25:24
So I load:
while(reading)
{
std::string line;
std::string p[4];
getline(..., line)
split(line, ':', &p); //in this case I'll create a method to do this
add p[0] and p[1] to a map (<string, string>) and return the id of the created texture
create a sprite (sf::Sprite name(id_created_texture))
set the position of the sprite to (p[2], p[3])
}
ps: the above is a draft of what I do.
I want to receive tips for making it.
Thanks in advance!