   Creating tilemap tools
  I have recently jumped into messing with tilemaps and I am filling comfortable with them enough to do basic stuff, but I find it really sucks to make a tilemap when you have to manually enter the index for which tile is to be drawn at that location (x)(y). I know there are libraries and editors already made around this, but my object here is to learn how I could build my own tilemap editor, I have been thinking about it, but not sure how to even start such a venture, my goal is to build a simple single layer tilemap editor using the basic,1000101110011100111010001for obtaining which tile must go in which, once I can build something like this I think this would be a good base to change things and make it more advanced as needed. Anyone have any suggestions, good links to check out? Please don't refer me to an already built editor unless it is written in C++ and has open source, thank you in advance.   
  This article explains how to do a basic tilemap editorhttp://lazyfoo.net/articles/article09/index.php   ;  you are going to need several things depending on how advanced your editor is going to be or your target plat formyou need an input methodfor mouse or keyboard, joystick, etceteracursor tracking (x,y) location - you need an offset for if your map is larger then the screenthen you can modify the tile array using fairly simple mathselected tilextile = int ((cursor position x )/ (tile width)) - xoffsetytile is the same and then you have access to the tiles xy location with in the arraythen you just need to keep track of what your current tile value is for what you are settingthats about all my original editor had, my tiles where a little more advanced, i think i had no walking parameter stored in there some where but its all the same in the end;  This isn't exactly editor related, but I wrote a article (if you can call it that) about something similar here. The basic theory is that if you have an array indicating solid and open tiles, you can dynamically calculate which index each tile should be (Assuming that the tileset is layed out correctly). I go into more details in the link, but it is something that I implemented in my own editor to make placement of tiles easier. I also  released a tool to help generate tilesets correctly. It is called TileGenerator and you should check it out. You can download it at the supplied link. Hope the link helps and feel free to ask any questions about the tool or the algorithm.Also, here is an open source editor written in C++: http://www.mapeditor.org/