Hi guys!
I've been working with C++ and SFML for a short while and when I was learning, I was told that having a multidimensional array or vector was a good way to load tile maps. I'm new to SFML and games development in general, so I worked with this for a while. After setting up a few small programs that used this, I began thinking about other methods of storing maps that allowed a little more freedom, and eventually came up with my current method. I'm not sure if it's in use elsewhere, as I was basically "winging it" and building it as I went instead of doing research on the topic.
Basically, I start with a single sprite and a single texture. I then set up the sprite how I want it, and push it back into a 1D vector of sprites. I then change the sprite again and push it back again. I do this over and over, until I have my map set up. To assist this, as writing it every time was a huge pain, I wrote a small level editor. It's not as feature-rich or nice to look at as something like Tiled, but I was programming to fill a need and it worked well for my projects, so I thought I'd share it.
Some information:
-Maps stored in txt files
-Tiles bound to a grid or freely placed art (or a combination) can be used
-Includes very, very basic collision
-Fill tool
-Rotation
-Adjustable tile and grid size
-Adjustable screen resolution
-Editor, test application, sample art, levels and test application source code in just over 3mb
-Compressed in a 7Z to under 1MB for attaching to this post
-More information in the readme
If this can be of use to you, feel free to use it in any way you like. I'd appreciate being credited, but it's not a requirement. There is absolutely no copyright on this whatsoever. Attached to this post is 3 screenshots and a the editor. The source code for the editor is not included, but I may release it if anyone actually uses it.
Thanks.