Racer Construction Set v0.5 Instruction Manual

Introduction

This program uses the following controls:

The program has a fully resizable window and works best with a thin and tall window. Pressing enter will toggle between full screen and windowed modes.

The Map

The game is based on a branching map allowing the player to take several different routes through the map. The world is based on 26 segments of track arranged in the following formation:

Basic Course Map

As should be clear, the player will be presented with two track branches to chose between at the end of every segment.

The Segment Selection Screen

Immediately on startup, the editor displays the segment selection screen, which contains a version of the map, shown above. Using this screen the user must select a valid path through the level, from start to finish, for editing. A segment may be selected or deselected by moving the mouse over it and clicking the left mouse button.

While the mouse is over a segment, its name will appear in the bottom left of the screen. The user may edit the currently displayed name using the keyboard.

Once a valid route has been selected the "Edit Route..." button in the lower right corner of the screen will become active and the user may move on to the track editor screen.

The Track Editor Screen

The track editor screen is where most of the work is done. Below is a sample screenshot:

Track Editor Screen

The display is composed of five distinct panels.

Preview Panel

A live 3d preview of the map.

Floor Tiles & Objects Panels

These display all the floor tiles and objects available for composing the map. The thing at the bottom is a scrollbar, allowing long collections to be scrolled through.

The current floor tile or object can be set by clicking. The cursor can be put back into object-free mode by either clicking anywhere in the blank space on these panels or by pressing the space bar.

Note that at any one time the user may only have either a floor tile or an object selected.

Elevation & Tilemap Panels

The elevation and tilemap panels form the meat of the editor. These two windows together give control over elevation, corners, road surface and object placement. Before discussing them in depth it is worth discussing the synchronisation marks that allow the user to understand how the tilemap and objects are mapped onto the elevation.

The first things of note are the blue distance markers. They are spaced every 16 tiles.

The second thing of note is the mobile distance marker. It is the thing purple line shown next to the mouse cursor in the elevation view. It is also visible in the tilemap window, just above a thick yellow bar. As the mouse is moved over either panel the mobile distance marker will follow it and simultaneously appear at the related position on the other panel.

The only other marks shared between both panels are corner marks, represented by thick yellow bars. A corner mark is a position where the curvature of the road changes. Curvature is a modal value, so a complete corner is represented by two corner marks - one to begin the corner and one to set the road straight again. Corner marks are added, position and manipulated in the elevation panel but their positions are also shown on the tilemap panel for orientation purposes.

The Tilemap Panel

The tilemap panel is used to paint the road surface and place trackside objects into the world. Although the road surface is ultimately mapped to a curving road, it is presented here as a single straight map. In the top left hand corner it displays the name of the road segment that reaches the top of the panel.

The scrollbar on the right of this panel controls the editing position. To fine scroll use the mouse's scrollwheel. Note that the elevation and preview panels are moved by this scrollbar also.

The most basic operation involves painting tiles to the tilemap. This is done by selecting them in the floor tiles panel then clicking on the tilemap. Clicking with no tile or object selected sets tile blocks to empty.

The editor supports a basic copy and paste operation. You may select a row of the tilemap by moving the mouse cursor over it and pressing the middle mouse button. That sets the source row. Then simply click and drag with the right mouse button to duplicate the source row over a target area.

Placing objects works in much the same manner as painting tiles. Select an object, then click on the tilemap to place a copy of the object.

Previously placed objects can be moved or removed by moving the mouse over them and clicking. The object the mouse is over will glow green so that it is obvious what will be selected. Clicking has the dual effect of removing the object from the map and making its type the currently selected object so that a new one can be placed nearby if wanted. Multiple objects can therefore be removed by selecting them in turn and pressing space inbetween each one.

The tilemap panel has one distance marker that is not duplicated on the elevation panel - the "end of section" purple bar. It is shown on the screenshot above extending halfway across the track five tiles below the tree. Its purpose is to show you where a track branch occurs and which side of the branch you should be painting. If the purple bar extends only to the left you should be painting the left heading branch. If it extends to the right you should be painting the right heading branch. If it goes right the way across then you are at a segment join that doesn't branch, giving the player no option as to their next direction of travel.

See "handling track branches" below for more information on how the engine handles track branches.

The Elevation Editor

The elevation editor is used to place elevation changes and corners.

Elevation is controlled by the placement and control of path points and tangent vectors, ultimately falling back onto cubic Bezier curves. These allow smooth hills to be constructed with relative ease.

Both path points and tangent points are shown visually as red crosses. The path points lie on the path and each one connects to exactly one tangent point by a green line. Both path points and tangent points may be moved by clicking and dragging with the left mouse button. The first and last path points are special in that they may not be moved left or right, just up or down. Similarly the tangents at those points will be kept horizontal. Tangents at all other points will not be allowed to go backwards.

To split the curve at the mouse position and generate a new path point, press the right mouse button. The editor will do its best to generate a meaningful tangent point, but this will not always be possible and it may take some movement to remove unsmooth bumps introduced by curve splitting.

To remove a path point, click on it with the middle mouse button.

It is possible to construct elevation maps that self intersect or create "caves". These designs should be avoided as they will confuse the main game.

Note that the tilemap for each segment is a constant length, so the editor must keep the arc length of the elevation curve constant. This may cause movement of some path points to appear to "drag" those it neighbours. For similar reason, the blue distance markers may compress and expand as you change the elevation in order to properly show how the tilemap is mapped.

As stated above, corners are also edited in this panel and are modal in nature. A complete corner between two straight sections of track requires two corner markers - one to start the curve and one to end it. Similarly a complicated sequence of corners can easily be created.

Corners are shown graphically as a yellow bar with a connected red "rocker" bar at the top. The yellow bar is simply used to position the corner along the track. It can be grabbed and moved left or right.

The rocker bar sets the curvature following the corner mark. It can be adjusted by clicking and dragging the hanging tip. Pushing it to the right will create a corner that heads to the right. Pushing it to the left will create a corner that heads to the left. The easiest way to judge the degree of curvature you are creating is via the 3d preview panel.

Clicik a corner mark with the middle button to remove it. Press space to insert a new corner mark at the cursor.

Mirroring tiles and objects

All tiles and object graphics can be mirrored. Use the cursor keys while in the editor to set the current mirroring before placing.

Handling Track Branches

Track branches are a modification to the main track drawing code that requires a bit of co-operation on the part of the level designer. The effect of a branch is that both of the following segments are drawn simultaneously from the end of the segment they follow. To prevent graphical errors it is recommended that the designer restricts rightward branches to using only the right hand side of their tilemap for the first few rows and launch into a rightward corner near-immediately. Left branches should be treated similarly but oppositely.

The driver sets which segment they will follow by which side of the road they cross the end of the preceeding segment on. After that they cannot switch segments so a genuine split is desirable as soon as possible, as are some sort of obstacles to prevent them trying to switch segments - subject to the restrictions mentioned below.

At present trackside objects are not dynamically sorted for depth. As a result the track designer should avoid placing objects on one branch that may appear visually "on top" of the other. As a rule of thumb, place objects freely on the outside of fresh branches, but arbitrarily pick a branch to put any "central" objects on. This "feature" may be fixed in a future version.

After heading down either branch, the other will only be drawn while the player is on one of the first 64 tilemap rows of their new segment. So it is desirable to have the other branch completely off screen by then. Note that there is no object sorting problem once the player has actually selected a branch.

Adding New Resources

All objects are stored in a directory named "objects" with the filenames "object0000.png", "object0001.png", etc. Note that the final four digit number is in hexadecimal so "object000a.png" should come after "object0009.png" and so on. The editor will start with object0000 and continue loading until it finds an unoccupied number, at which point it will stop. To add new objects simply place them in the directory and give them the next sequential number.

Be warned that the engine does not bother checking if your objects exceed the maximum texture size of your graphics card at present. A future version will downsample or divide problematic objects.

Tiles work in much the same way as objects but rest in the tiles directory with names "tile0000.png", etc. They should have power of 2 dimensions, preferably 64x64.

Features Yet to Come

Basically a wish-list of future features: