RC Editor

[ Back ]

With the Raycaster Editor you create maps that you can load and use with the Raycaster and Mode7 libraries. If there's something you don't understand when reading this documentation of the program, it might be of help to have a look at the libraries and their examples.

The program has got six windows named Edit window, General window, Images window, Items window, Map window and Preview window. They're explained in detail below. In the Edit window you load, clear and save maps and select between different edit modes. In the General window you change the map size and set fog properties. In the Images window you load and set up images that can be used for walls, ceilings, floors and items. The Item windows allows you to set up visual objects that can be added to your game map. In the map window you create the actual map from walls, ceilings, objects and flags. The preview window allows you to move through the map you're currently editing.

The best way to learn how to use this program is probably to look at the maps of the Raycaster library's example programs! Still, the first thing you do when creating a map is to visit the General window and make some settings ...

The General window

A raycasting map is basicly a 2D grid, where each cel represents a cube with some properties, or layers. In the General window you can set the size of your map, the number of cubes in each direction, by editing the Map width and height fields. You will not lose any data by increasing the map size, but you may lose information when decrease the size.

In the General window you can also set the fog range and color. When a wall, floor, ceiling or object passes a certain distance, z min, it will visually start getting blended with the fog color (RGB). At the distance defined by z max everything is covered by the fog color. In other words, z max defines the far clip plane during rendering.

The Images window

In the Images window you can load images that can be used for walls, floors, ceilings and items/objects. Each map can have 63 images, indexed as 1..63. You load an image by entering an index next to the Index label and pressing the Load button. If you want to remove an image, you can use the Clear button. If you want an image to use a colorkey for transparency, you mark the checkbox next to the Colorkey label. Then enter the color (RGB) that you want to make transparent below.

The Items window

If you've read the documentation of the library, you know that there's something called objects. An object is basically an image in 3D space that is always facing the player. You use objects for everything from collectable bonuses to lamps and enemies.

Every map has an item layer that you can modify in the editor. That is, every cel in the grid can have an item set. Items are visually represented by objects, that are automatically added when the map is loaded in your program. You can use items for non-moving objects, such as barrels, lamps and bonuses.

To create an item type, select an index (1..63) next to the Index label. Then, below, select the image you want to use - the value on the right of the Image label is the index of an image set in the Images window. Change the size (0..1) of your object by using the field next to the Size label. If you set the size to 1, the object will visually be as tall/wide as a wall. On the right of the Align label, you can use the radio buttons to decide whether the visual object should stick to the ceiling, floor or be vertically centered. If you mark the checkbox on the left of the Obstacle label, the item will become an obstacle that the player (or anything using the RC_Move function) can not move through.

The Edit window

With the Load and Save buttons you can load and save maps. The Clear map button clears all layers of the map but leaves the images you've loaded and the items you've set up. Clear all clears all layers, images and items.

There's a centered list of labels for everything that you can edit in the Map window. You can use the radio buttons on the left side of the list to decide what you want to edit in the Map window. With the checkboxes on the right side you can decide what layers should be visible in the Map window.

If you want to erase something in the currently selected layer you can mark the Erase checkbox at the bottom left of the window.

Walls

Each cel in the map grid can have a wall image set. This image is used for the four sides (in the x, z plane) of the cube that the cel represents. When you edit walls in the Map window, you're always using the image that's active in the Images window.

Floor/Ceiling

Each cel can also have a floor image and a ceiling image. They're only visible if the cel has no walls.

Items

Each cel can have an item. When editing the item layer in the Map window, you're always using the item that's active in the Items window.

Doors

A door is a horizontal or vertical wall centered in a cel. Doors can be opened from your program code. You use the currently selected image in the Images window when editing doors (any image can be used as a door). In the Map window a door is represented by an image and a vertical or horizontal line. Once you've added a door to a cel, you can click again in the cel to swap between a horizontal and vertical door.

Game flags

A game flag is an integer value (>0) that can be set for any cel. You can access these flags in your program and do whatever you want with them. When you edit game flags in the Map window, you use the flag that is set in the field next to the Flag label at the bottom right of the Edit window.

Loader flags

Loader flags are edited just like game flags. These flags are returned, together with their map coordinates, to your program when calling RC_LoadMap. You can use them to initialize enemies and other things.

Player

Each map has a starting position for the player. It's the first element of the array returned by RC_LoadMap. You don't need to use it in your program, but it is used when you walk through your map in the Preview window. The player position is represented by an arrow in the Map window. You can click in the cel that holds the arrow several times to change its direction - the starting direction of the player.

The Map window

You change (set or erase) the layer content of a cel in the map grid with your left mouse button. Loader flags are represented by yellow values and game flags by green values. You can change the visibility of the different layers in the Edit window.

The Preview window

If you want to move around in the map you're editing you can use the Preview window. Press the Generate button to create a new preview (you need to do that everytime you've changed something in the map). Use the round thing with arrows to walk and turn around - it's sort of a virtual analogue joystick. Just Fiddle around until you get the hang of it. If you wish to open a door, just stand in front of it and click on it.

[ Back ]