RC Editor

[ Back ]

With the Raycaster Editor (rc_editor) you create maps that you can load and use with the Raycaster and Mode7 libraries. The Raycaster library is used for Wolfenstein 3D-like games, while the Mode7 library can be used for Mario Kart-style games.

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. You can load the maps used by the examples in this editor to better figure out how things work.

The map and its settings


Under "Map", you can change the size of the map and modify an optional fog effect. The map consists of a grid where each cell (or tile) represents a cube in the game world. What size is such a cube then? Well, the player's eyes are always positioned half a cube's height above the ground. Feel free to make any further calculations! Each cell can hold the following things:

Don't feel confused about the game- and loader flags. They have no specific purpose, which means you don't even need to care about them. They're there for passing extra information to your program. I personally use loader flags to tell my program where to spawn enemies, and game flags for storing extra information about cells (let's say a barrel can contain an item for the player to pick up, then the game flag at the barrel's position could be used to determine what type of item should spawn when the barrel is destroyed).

The width and height of the map is specified in cubes (or cells or tiles ...).

If you mark the "Fog" checkbox, a fog effect will be enabled for the map. The fog starts at the distance entered for "Fog z min" and ends (appears fully opaque) at the distance entered for "Fog z max". The value of "Fog z max" also serves as the "far clip plane" when the world is being rendered. The fog color, "Fog color", should be written in HTML notation (000000 for black, ffffff for white, ff0000 for red, and so forth).

Textures

Walls, floors, ceilings, doors and items all use textures, and texture is just a fancier word for image. A map can use a maximum of 64 textures (atleast that's the limit of this editor).
   For each index, 1..64, that you can change using the arrow buttons or the text field next to "Index", you can load a texture with the "Load" button.
   If you want all pure magenta texels (fancier word for pixels) in a texture to be transparent, mark the checkbox next to "Color key". Transparency should only be used for textures meant for items.
   If you delete a texture with the "Delete" button, all objects using the texture will be removed from the map.

Items

   

An item is a "billboard sprite", a 3D image always facing the camera (player). A map can use a maximum of 64 different items.
   Use the buttons or the text field next to "Index" to change the index of the item you wish to set up/edit.
   You can change the item's texture using the buttons and text field next to "Texture". The texture value is the index of a loaded texture (see above).
   Change the size of the item with the buttons or text field next to "Size (%)". The size is a percentage value, where 100 represents the full width/height of a cube side.
   Use the radio buttons next to "Ceiling", "Center" and "Floor" to position the item. Select "Floor" if the item should stand on the floor, "Ceiling" if it should "hang" from the ceiling, or "Center" if it should hover in the middle.
   If you mark the checkbox next to "Obstacle", the item will block the player (and other things with movements controlled by the RC_Move function of the Raycaster library).
   Deleting an item with the "Delete" button will clear the item and remove all instances of it that you've placed on the map.

Editing

Under "Edit" you can use the radio buttons to select what "layer" of the map you want to edit. If you select "Walls" you can add (draw) walls in the map view with the left mouse button. You can also erase walls with the right mouse button. The walls will use the texture currently selected under "Texture" (see above). The same procedure goes for floor, ceiling and doors.
   You can use the checkboxes under "Show" to toggle the visibility of the different layers in the map view (usually you only want to see the ceiling when you're editing it, since it covers most of the other layers).

Doors are a bit special. A yellow bar shows their direction (vertical or horizontal, as seen from above). You can change the direction of a door on the map by clicking on it.
   If you select "Items" under "Edit", you can add instances of the currently selected item (see "Items" above) to the map using the left mouse button. Remove items from the map with the right mouse button.
   You can set the player's starting position by selecting "Player" under "Edit" and clicking on the map. The position is shown as a yellow arrow. You can rotate the arrow, to change the direction in which the player is turned, by clicking on it.
   Select "Game flags" or "Loader flags" under "Edit" if you want to add game- or loader flags to the map. Left click on the map to add flags and right click to remove.

You can change what game- or loader flag you want to add to the map with the text fields next to "Game flag" and "Loader flag". Game flags and loader flags are seen in the map view as green and yellow numbers.

You can scroll the map using the arrow keys on your keyboard. By holding down the left shift key while clicking in the map view, you can also copy a tile (make it the current one) from the active layer.

Preview

At any time, you can click the "Preview" button to take a walk in the "world" you're creating.

[ Back ]