Lode Runner decoded
Lode Runner is one of my all-time favourites. It was one of the first computer games I ever saw on the Apple ][, and later on I spent countless hours playing it on my C64. My next contact with the game was when I started studying - the Macintosh had a very good port, and for I while I even thought I could write my own port for the Amiga. Well, we all have our dreams :-) Years later I felt compelled to buy the first Windows port, but all the fancy stuff they had added to the game (including the WinG stuff to make it run, yuck!) never worked for me. Now that it's running fine on the emulators, I'd like to devote a few lines to the game and what I have learned about it's level data structure.
Table of Contents
In order to help you finding what you're looking for, this page is split up in these sections:
To quote from the manual:
In less prosaic terms, your objective is to collect all treasure chests on each level and escape by reaching the top row of the screen. At times, this will only be possible by climbing a special Escape Ladder that only becomes visible once you have collected all chests. Besides your wit and your speed, you have one advantage over the evil Bungeling guards: You can dig holes in the normal brick floor. These holes can either be used as a quick escape, or to trap the guards temporarily - this will also make them give up any treasure chest they're carrying. Holes will only stay open for a while, so you should attempt not to get caught in them. Guards that are trapped in a closing hole will rematerialize at the top of the screen.
Beware that not everything that looks like a normal brick is indeed a brick: the game also has trapdoor stones that look just like bricks. If you step on one of them, you will just drop through. If you've fallen in a trapdoor and your way down is blocked, you can move out of it sideways, if there's room. You can't walk into a trapdoor sideway, though.
The keys given here refer to the C64 keys. On my favourite emulators, CTRL is mapped to SHIFT and the Run/Stop key to the Tab key.
To start a game, just press the fire button on your joystick, or press any key on the keyboard. To display the High Score table during demo mode, press Return.
Before you can edit your own levels, you need to initialize a blank disk with the "I" command to hold them. Typically, you'd use a utility like Star Commander or 64Copy to create a blank D64 image, which you'd then attach to the drive 8 of your Emulator. If possible switch off "true drive emulation" or activate "Max 1541 speed" in your emulator - at only 100% of the original speed, the initialisation process talkes quite a while.
To get into the Edit mode, press CTRL-E in demo mode, or while the title screen or the High Scores table are displayed. To leave the edit mode, start playing a level from the original disk, then abandon the game. Alternatively, try playing a level that doesn't exist on the current level disk.
The following Editor Commands are available:
The editor is not very smart when it comes to verifing wether a level you designed is actually playable. For example, it allows you to place more than one player icons on the screen, which clearly isn't feasible. You also can't have more than 5 guards. Finally, it neither verifies wether you are able to collect all treasure chests, nor wether you can actually reach the top row of the screen. These are things that you have to check yourself.
This is work in progress. If you feel that there's a strategy missing here, please drop me a note.
If you've only played the first few levels of the original Lode Runner, you probably also haven't grasped all of the subtle features of the game. Understanding them is the key to beating Brøderbund's Championship Lode Runner - and to create new, challenging levels.
The Screen Layout
Lode Runner is a tile based game that uses the C64's 160x200 multicolor mode (which is really a 320x200 pixel mode with double-width pixels). Each tile is 5 pixels wide and and 11 pixels high. The playing area consists of 16 rows of 28 tiles. This leaves a 10 pixel margin at the left and right sides, and a bar of 24 pixes height at the bottom. This bottom area is used to display the current level, the number of lives remaining and the current score.
Lode Runner has 8 different tile types. In the Editor, two additional tiles are used to represent the player and enemy start positions.
Since there are less than 16 different tiles, it is both convenient and efficient to store tiles as nibbles instead of bytes. Thus the 488 tiles of a Lode Runner level can be represented in 244 bytes - which nicely fits in a single sector of a C= 1541 floppy. Incidentially, this is the storage format used by the C64 Lode Runner. The first level is stored on disk in sector 3/0. Probably for historical reasons, only the first 16 blocks per track are used for level storage, so the 150th (and final) level is located in sector 12/5.
The tile data for each level starts at byte offset 1 in each sector. Byte 0 probably has a special meaning - it seems to be $0D in the first and last levels, and $00 else. The tiles are stored in left-to-right, to-to-bottom order, with a small twist: the low nibble of each byte encodes the left tile and the high nibble encodes the right tile in each byte of data. This is counterintuitive since you read the nibbles the other way 'round in the hex dump.
Championship Lode Runner uses a slightly different format. To get back to the normal format, you'll have to invert (EOR $FF) all bytes. Additionally, this game has also a "win" phrase for each level.
Auswege: Impressum, Haftungsausschluß, Datenschutz, thb's 64'er-Seite, meine Homepage.
Links: Imprint, thb's C64 page, my homepage.