Montezuma's Revenge maps

As you know if you have been looking at other parts of my homepage, I have a soft spot for vintage computers and games. I particularly enjoy playing games on one of my several Commodore 64s, since this was my first computer, and I spent countless days playing on this fantastic machine (the most popular home computer ever - if you count the number of units sold).

One game I have enjoyed countless hours of fun with is Montezuma's Revenge. At one point I actually started drawing a map of the game (hand drawn, while playing on the C64).

Montezuma's Revenge title screen

When I got a working C64 emulator for my PC (at that time I used C64S for DOS), I found the ability to make screenshots, and started making a map of Montezuma's Revenge. I managed to get screenshots of every screen in the first three levels (there are 100 screens per level). Then I hand-edited the map by putting all the screenshots together in PageMaker, and printed a small part of it on an inkjet printer. Although it looked very nice, I was still not quite satisfied, since every screen would show the inventory, score etc., as well as the player (which I have later found out is named Panama Joe). Editing out these by hand got boring very fast, so the project was never finished, although I think I still have the screenshots and the PageMaker-file somewhere.

Then in february 2005, I was playing with some new emulators, and managed to find one that worked on my laptop, with the ability to run in fullscreen with TV-out, giving a feeling very similar to playing on the real thing. To top it off, I found an old digital to analog joystick-adapter I made a while back, and plugged in an old digital C64 joystick (The Arcade - if that rings a bell). Finally I was able to play the games the way I was used to, while still having the benefits of the emulator (for this project, particularly the ability to make screenshots was useful).

After playing for a couple of hours, I felt that the time had come to do a new attempt at a complete map of Montezuma's Revenge. I started doing the screenshots of level 3, and soon had the complete level (the game allows you to start on level 1, 2 or 3, and of these only the third level has all 100 screens accessible, and is also quite similar to the following levels). Steel Lynx came to the rescue, by handling the screenshots, while I played the game. When we had all the screenshots for level 3, we created a couple of perl-scripts using GD to process the screenshots, giving us a PNG of the entire level. Having a printout of level 3 made it a lot easier to do the remaining levels, since we were able to see where we were all the time, and cross out the screens we had already taken screenshots of.

The game

In this section I will describe a couple of facts about the game. These are the discoveries I have made while making the map (and some I already knew from playing the game on my C64 way back in the last millennium.

The game has nine different levels, each consisting of 100 screens, organized as a pyramid with a base 19 screens wide and with 10 screens height (although the topmost screen is the title screen of the game, and you cannot control Panama Joe when he is in this screen).

The levels become more and more difficult by simply changing a few bits between each level (such as a wall or a door blocking your way, some extra enemies, a key having a different color etc). This means the levels are quite similar, but still increasing in difficulty throughout the nine levels. From a technical perspective, there is no room to store a bitmapped graphic version of each of the 100 screens, so I assume there are instead a small routine that initializes each screen. This routine then looks at the level-counter, to determine if an object or a wall should be placed in the screen or not. The game stores the state of each screen in a 200 byte memory area (16 bits per screen), allowing the initialization routine to know if an object is already taken, a door is opened, or an enemy has been killed. This means there can be at most 16 things that can change in each screen (so the sum of monsters, objects and doors per screen can be at most 16).

As I have already described, the game allows you to start on levels 1, 2 and 3. On the first level, all access to the right part of the pyramid is blocked. Similarly most of the left part of level 2 is not accessible. From level 3 onwards, all screens are accessible, and there are a few more ways to complete the levels.

On each level some of the screens are "dark". You can only see these levels if you have picked up a torch. If you do not have the torch, you can only see the enemies, chains and movable floors, as well as the fire. On the first level, only the lowest row of screens is dark. On level two, the two lowest levels are dark, and so on. The background colors of the screens also cycles for each level, so the first dark level (from the top) is the gray one. This is one of the ways the game gets more difficult through the levels. From level 5 you are forced to go through some dark screens in order to get the torch. It is therefore important to be able to memorize and visualize each screen, so you know where to jump. On level 9, all screens are dark. To make this level even more difficult, there are no torches on this level, so you have to complete the entire level in darkness (at which point you will go to level 9 again). Notice how a wall is missing on level 9, in the screen just above the end of level (the middle column, second screen from the bottom). This actually makes it possible to complete level 9 in a way not possible on the other levels. If you do not know that this wall is missing, it is, however, not very likely that you will be coming this way in complete darkness, since this way is blocked in all the previous levels.

You get points for killing monsters (using a sword), opening doors and picking up inventory (such as keys, swords etc). You also get points for the yellow gems (which only give points, and take no room in the inventory - although you cannot pick them up if your inventory is full, e.g. 5 items). An extra life is awarded for every 10.000 points. You start out with 5 lives (plus the one you are playing), and you cannot have more than 20 lives (the screen only shows 11 of them). When you lost all your lives, the game is over, although you may on the first levels restart in the same screen once (for an additional 5 lives) by pressing fire.

Another thing that raises the difficulty is the fact that from level 5 onward, the enemies do not dissapear if you are killed by them. The only way to get rid of the enemies after this level, is to use a sword. The sword can only kill the spiders and skulls, not the snakes. In some screens there is also a hammer, which, when picked up makes you invincible to the skulls and snakes (but not the spiders) for a period of time (about 10 seconds).

The scripts

The scripts to create the maps are written in PERL, and use GD to handle the images. The first script is one-screen.pl which processes each screen. First the inventory, level display and score is removed by filling it with an 8x8 tile of the brick-pattern (taken from an area of the screen, which is always occupied by this pattern).

Then a loop searches for Panama Joe (by using a bitmap of him facing left and one facing right) and removes him. This requires him to be stationary on the screen, and standing on a clear area (black background). For a few screens this was not possible (standing on a ladder), so in these screens, Panama Joe was removed manually.

Finally the screen is saved again, with the borders cropped off.

The other script is called stitch-level.pl. It opens all the PNG-files in a directory, and copies them into a big image (which is saved as a 6080x1970 pixel PNG). It uses the filenames of each screen to find the position this screen goes into. We have named the columns a through s and the rows 0 through 9, so the title-screen is j0.png, the end-screen is j9.png etc.

After the level is stitched, it is easy to see if any screens are missing. In that case, a few extra screenshots must be taken, and prepared (with one-screen.pl), before stitch-level.pl can be tried again.

If you want to experiment with the scripts, be aware that they require the files to be named consistently and placed in appropriate directories. Since I doubt the usefulness of the scripts without modification (why would you want to spend a lot of time creating the maps, when I have already done so), I haven't bothered putting the man-left.png and man-right.png files here. Perhaps the scripts can give inspiration if you want to do something similar. They should be fairly self-explanatory (provided you know a little PERL).

The poster

After completing the maps of all levels, I started thinking about getting it printed in poster-size. I decided that the odd aspect-ratio of the levels was not appropriate for printing a single level on a poster, so I decided to experiment with some combinations of levels, and made some test-prints on my Samsung CLP-550N color laser printer (of course these printouts were only 20x30 cm, but it still allowed me to find an appropriate scaling where you would still be able to see the individual screenshots).

When I found Jonathan Fuerth's maps, I immediately discovered that the colors of his maps are much brighter. It turned out that the emulator I had been using was configured to use a palette which was quite pale in comparison (aparently it was sampled from the VIC-chip of an old C64). Comparing the colors, I found the bright ones more true to what I remember from playing Montezuma's Revenge on my C64, hooked up to the TV. Perhaps the contrast setting on the TV had been given a boost. I also figured that the more bright colors would be more appropriate for printing, so I went through the process of altering the palette of all nine maps. But this was a great deal easier than doing the 900 screendumps again with the altered palette configured in the emulator.

It was decided to create a poster with levels 1, 2, 3 and 9. I used Paint Shop Pro to create a composite image, and then using a screen-shot of the title-screen, I traced the text as vector, and created a nice shading for the text. Similar vector-drawing was used to create the text for "LEVEL 1" etc., and for this, the colors from the individual levels were used. I finally added some text with credits and the URL of this web-page. The final poster artwork is available as poster.png (1MB), which is what was sent for printing (except this is PNG instead of TIFF, to save some space and bandwidth).

I then talked to a friend, who has acquaintances in a small company that does professional printouts for photographers etc. They have invested in a large printer that is able to print about 1m wide (40 inches) and up to 300m (almost 1000ft) in length. The printer can print on heavy paper, glossy photo-paper, some translucent plastic (for backlit applications), and even fabric (for banners). I got it printed on heavy paper 70cm wide by 1m in height. The poster has now been framed, and is hanging in my living-room. The following image gives an idea of how it looks framed:

Framed poster of Montezuma's Revenge maps

The maps

Level 1

Level 1

Level 2

Level 2

Level 3

Level 3

Level 4

Level 4

Level 5

Level 5

Level 6

Level 6

Level 7

Level 7

Level 8

Level 8

Level 9

Level 9
Last updated: 2006.01.15