Friday, June 26, 2015

The Map III

Unfortunately, I was a bit ignorant about approaching the map. In saving the files, I saved them as the default .xcf file type that gimp uses. As it turned out, what I really needed was .png files. Any time you have 100+ of something, it's generally a really good idea to take a second and see if you can automate whatever you're going to have to do.

So, I wrote a program that went over the map, and copied each individual unique room to file. It was compared against using python's ImageChops and the PIL.

My next step is now to go through the saved rooms, and store the unique tiles using essentially the same code. Now, I know that some tiles will be junk, such as the word tiles, monsters, powerups, and such. So, once that's done, I'll put good tiles into one directory, and bad into another. Then, I'll go back over the saved rooms. If the tile is in the good tiles, I will draw it. If it's in the bad tiles, I'll draw a black box (because everything is black) to erase the offending tile.

This will clean all of my rooms up to be blank. I have to think more about further steps though.

No comments: