THE LEVEL EDITOR ================ The level editor is a little hard to get most of the time, so here are some hints. We'll make it a tutorial. NOTE: The map created in this tutorial is available at You might like it as an example. o Open the level editor by typing loser-map in a command line. o Open a new map by using the menu File->New. Choose, for, now width 20, height height 20. Choose -1 for the fore- and background. This will get you a transparent background, which is kind of cool because in the game a larger image will serve as the background instead. (Notice that you can use any other tile that you see in the bar as long as you know its number. They're numbered -1, 0, 1, 2, etc.) o Choose File->Read tiles... to choose your set of tiles. Choose Castle 3. FIXME: explain quirks of file chooser. o Choose Configure->Map info... Fill in your name and a comment. At "Tiles:" fill in "castle3::sky". I can't help it, but you'll have to fill in this syntax by hand. You now have an empty world. Never mind how the background is filled in for now. Let's have a first look around in the interface, shall we? At the bottom right, there is a little map of the scene so far. The darker grey area indicates the part of the map currently visible on the screen. o Move your mouse to the big map. Push on your MIDDLE mouse button and make a dragging movement (= mouse still pushed) to the right, or to the bottom. Notice how you move around in the map this way. At the bottom left, there is a button titled "double". Never mind that button, it seems to be broken. But above that button you see the text "Tool: tiles". o Right-click on that text. Notice how this pops up a menu. Select "blocks". Notice how this changes the little square pictures in the bar. o You can use the slider on top of the bar to see all the blocks. Try clicking on any of the blocks. Notice how a green line at the top and one at the bottom of the block indicate which one is selected. o Select the second block in the bar (that is, the first block with this red background). Notice how every block has little blue squares in it; this one has all sixteen. o Start clicking around in the big map. Notice how the blue squares appear everywhere you click. Notice that this is also visible in the minature map. You can erase your work by selecting the first, empty square and clicking around with that one. o Choose Edit->Change size... Change the map size to 10x6 (note: this is only done so that you get a map that is just the size of the visible area, which happens to be an easy size for the rest of our tutorial). The little blue blocks indicate places that a character can walk on (e.g. not fall or jump through). The three blocks at the right are special. The first one (with the blue cross through it), I'm not yet sure of. The second two can be used to indicate that where a player starts in this level, and to which way he looks ("starting arrow"). Use exactly one in your level. Next, we'll start building a level. To keep this tutorial simple, please build the level as follows: Legenda: > = starting arrow (pointing to the right) _ = empty space X = full block (the second block, all 16 squares) __________ >_________ XXXXXXXX_X __________ __________ __________ From this point, your level would already be playable, but you wouldn't be able to do anything but walk around in mid-air. Let's dress this up a little, shall we? o Go to "Tool: blocks" in the bottom left of your screen, right-click. Select "tiles". You can now select all kinds of tiles in the bar. o Somewhere at the bottom of the screen, there is a text "Layers:" and a blue and a grey square. Click on the square that's near to the text "Background". From now on, all the tiles you put in your map will become background tiles. Go ahead and try it. Make a nice background, but don't add too much big rocks and stuff yet. Also, keep a little open space so that you will be able to see how the game inserts a background image there, when playing. Be sure to put a door in the bottom left corner. o Now click on the square near to the text "Foreground". From now on, all your tiles will be foreground tiles. Place big rocks and stuff on the places where your character can walk on (= where the blue boxes are). o Place one extra rock on the "hole in the floor". Notice that your character will still fall throught this hole (no blue boxes), but that it will not be a visible hole (just this big rock)! Also notice that your character will walk BEHIND anything "foreground", and BEFORE anything "background". This is how you can add all kinds of "3D effects". Now we have a map with a small route and nice artwork. But we still miss one thing -- action. o Go to "Tool: tiles" in the bottom left of your screen, right-click. Select "objects". Notice how, for a change, your bar is empty. This is because the objects system is a little different from the blocks and tiles system. o On the right of the menu bar, you'll see a text that goes something like this: "Map (00006, 00004): (fg= none, bg = 0084)". The values in your bar may be different, of course, but the first two numbers indicate your current map coordinates. Go to the coordinates 9, 1 (or: Map (00009, 00001)). Right-click. See how you've just placed an energy item. Now this will lure the player towards our hole in the floor! How devious of us :-) o If your right-click already popped up a dialog, click it away for now. This happens when your right-click is too long. o If you need to delete an object, just select it by clicking on it, and press "Delete" on your keyboard. o Go to the coordinates 1, 5 and right-click. Again, this creates an energy item. Right-click again in this new item. A dialog appears. o Click on the text "Item: energy". Select "Item:tele/teleporter" from the pop-up menu. Click OK. o Go to the coordinates 9, 2 and create a new object. Make this one an "Item:tele/target". Now when the player hits the teleporter, we want him to be teleported to the target location. Therefore, we have to make some kind of link between the teleporter and the target. This is something tricky, so carefully follow the instructions. o Select the teleporter. Hold down Control and click on the target. o Right-click on the teleporter. Look at "Target". The number is the number of the target object, but these numbers change when you add more objects, so you can't really rely on them. Just use this method and your connections will be alright. o If you still see "none" at "Target", you didn't successfully link the object to its target. Try again. o If you need to remove a link, just click on the number in the dialog and select "none" from the drop-down menu. o If in gameplay you notice that e.g. you get stuck in a teleporter Notice that you can do more with targets than just teleporting. For instance, a lever can open a door, in which case the door is the lever's target. For now, we'll just leave it to this teleport. Of course, feel free to experiment later on. There are two things we'd still like to add: a few enemies, and an exit. First, the enemies. o Go to coordinates 5, 0 and add an object. Choose type "Enemy: anvil". o Go to coordinates 4, 5 and add an "Enemy: loser-shadow". o Go to coordinates 0, 5 and add an "Item: tele/ door". (If all is well, you've painted a door somewhere around here, remember?). Now there's just one thing left for us to do, and that's making an end. Unfortunately, L.O.S.E.R isn't yet capable of making a nice ending to the game. All that it still can, is teleport you to another map file. (If you've wondered why you never succeeded in finishing the game, well, here's the reason.) Anyway, teleporting is a better end than no end at all. So let's do it. o Add an "Item: text". In the item options dialog, you can fill in any text where it says "Text:" . Fill in "test". If you save your map as "test.map", you will now be teleported to the beginning of your map. You can also use the name of any other existing map. o Connect the "Item: tele/door" that you've created earlier with this text. o Save your work as "test.map". BE SURE TO USE "File->Save" OR LOSE YOUR DATA! o Copy your new map to where the other maps reside (usually /usr/local/share/loser/data/maps/ or somewhere around there). o Start the game and select your map. o Well... play! Try to reach the teleporter-door and see what happens. That's the end of our tutorial. A few tips to keep you moving: o You can also link "Item: text"'s to "Item: info" signs. The text will appear when you press Tab at the info sign. Good luck making maps! Stefan Rieken