Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - simpl

Pages: [1]
1
Graphics / [TileMap] Looking for a suitable way to store data.
« on: September 04, 2014, 11:10:48 pm »
Hello :),

as my topic title says I'm looking for a suitable way to store or rather represent the tile map data in a class.
For a long time now I'm working with the tiled map editor and I like it.
Now I'd like to write my own minimal parser, the xml stuff isnt much the problem, but I have no idea which approach I could make use of, to store the data in a class. There is already a library, written by fallahn (sfml-tmxloader). In my case it just doesnt fit well.

Instead of using arrays of vertices, I stick with simple Sprites as my map isnt very big and array of vertices would just be an overkill. In tiled I use only the iso way of drawing, but that is another pair of shoes.

For now the data is described as follows:
std::vector<std::shared_ptr<sf::Sprite>> mTiles

and for different layers:
std::map<sf::Uint16, SingleLayer::Ptr> mMapLayers

It works very well, but what could I do to get a tile at a specific position?
My idea was to store it somewhere else, maybe in the logic of the mapParser, but that doesnt make much sense to me. Somedays I read a very interesting topic here about two-dimensional vectors for tilemaps, but I'm unable to find it .. :(.

My finally question is now, what are the best practices to store sprites for a tilemap?
Should I go with the current approach? Im a little bit doubtful..

Thanks for your time :)

2
SFML projects / Re: 'Tiled' Tile-map Loader
« on: April 30, 2014, 07:46:37 pm »
Hey, first of all thanks for sharing your work with us .. =).

Unfortunately I have a problem with creation of the project files with CMake.
Like Ricky (http://en.sfml-dev.org/forums/index.php?topic=3023.msg104256#msg104256)
the error CMake is providing is as follows:
CMake Error at CMakeLists.txt:32 (install):
  install Library TARGETS given no DESTINATION!

Apart from that there arent any errors.

I would be very happy, if you could provide a solution for this problem.
I read on the same page about commenting this line out, but this shouldnt be the final solution, should it?

Greetings!

Pages: [1]