I’ve been working on a new game mode for Eccoes and I needed to make a new map. My current maps were stored as simple text files with symbols:
X 1 2 X
It was an easy way to store the information my map needed, but it was a huge pain to edit. It was hard to tell my maps were square, since the individual letters are not. And I had to be careful that my edits didn’t mess up the formatting I had in place.
My original plan was to look for a program that would let me edit my text files like a grid. However, I found a lot of suggestions to use a tile editor and read in their file formats.
I decided to use Tiled Map Editor to build my maps in. It looked reasonably popular, had an easy to parse file format, and supported placing objects on the map. And instead of spending time learning how to parse it, I grabbed a Python library to do it for me. I was going to use tmxlib but it recommended a more specific library for games like pytmx. The potential advantage of pytmx is that it integrates with pygame and create usable image objects for my sprites. Right now,I’m just using it place my walls and set spawn points for my players, but I will appreciate having the ability to craft complicated maps and have pytmx handle all the graphics loading.
The Tiled Map Editor made building my maps way easier than editing by hand, and I was able to replace my old map system very quickly.