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.

Monday, June 22, 2015

The Map II

I'm currently taking a small break from working with the map image, and what I've been doing so far is changing all blank areas (rooms that are completely black) to white areas, which will mean it is totally empty when I read the file programatically. Unfortunately, the creator of this map used the same color as what is in the tiles (black), so it was not a simple matter of just bucketfill or what have you. I endured the tedium of doing this manually.

And with that done, I have also started going over the map and saving the rooms themselves to files. Anyone who has played Metroid would agree with me that the game is visually repetitive. It's because they reuse rooms often. I save one and delete the rest. Thankfully the differences are fairly easy to spot, and a room is usually placed only within proximity of each other of the same kind. Regardless, it is mind-numbingly boring.

So, the map itself is comprised of 30x30 room sections or 900 rooms, however, many rooms are not used. In fact, 387 rooms are empty. This gives us 513 rooms at face value, but many rooms are solid blocks, which serve to end a room pattern. There are 58 of these rooms. The total explorable rooms is now 455.

That is all for now.

Sunday, June 21, 2015

Déjà vu

I recently started working on this project again, having forgotten all about having kept record of what little work I had previously done on this blog. As I began searching for a site to blog my project, this came up and thanks to google's auto-login features, I was reminded of this blog's existence.

This makes me quite happy because it saves me some work.

At any rate, I have decided to start with creating a clone of classic NES Metroid in python using pygame. Sure, using Super Metroid tiles for the finished product would be great, but realistically, it's a pretty small change. What needs to happen right now is simply to create the clone to the point of not being able to discern which version of the game it is without some careful analysis, such as jump heights, timing, etc -- which will probably be very difficult to get just right.

Obviously, this is not as interesting as the initial project idea because hey, if you want to play Metroid, just go play it on NES.

Regardless, for the sake of memory and moments like now, I will blog my progress.

Stay tuned.