Turbo Sliders Editor (c) Antti Mannisto <Antti.Mannisto@iki.fi>
----------------------------------------------------------------
 
  This README is deprecated, read manual-editor.htm instead. 
This file may still contain some tips about command line using
that are not in the htm so you may read it if you want.

  Please read and understand everything in this manual before
you distribute your own tracks.

RUNNING EDITOR

Use editor.exe with command prompt (remember to first go to the 
installation directory with cd, for example by typing 
'cd c:/games/sliders').

  Usage:

editor [-x <screen x size>] [-y <screen y size>] [-fullscreen 0|1] 
       [-tx <track x size>] [-ty <track y size>] [-scale <sc>] 
       [-fit <0|1>] <track name>

  If the track name is an existing track, the editor opens it using its
size. Otherwise, a new track is created with the given name and track
size. If -tx and -ty options are not provided, default size is 640 x 400.
If you open an existing tracks, the tx and ty options have no effect. (If 
you want to change the track size afterwards, you will have to edit the 
track file manually.) Scale defines the zoom level (default: 1). Fit
defines whether fit-in-screen is set (default: 0).

  There is also a special option "-save 1" which just opens a trk file
and immediately saves it and exists. This way, third party editors
can generate hash and pattern information easily.

Examples:

  Creating a new track named Foobar of size 640 x 400:

editor tracks/foobar.trk

  Opening the existing track Foobar:

editor tracks/foobar.trk

  Creating a new track named Foobar2 of size 960 x 600:

editor -tx 960 -ty 600 tracks/foobar2.trk

  Opening the existing track Foobar2 in a bigger window: 

editor -x 960 -y 680 tracks/foobar2.trk

  Opening the existing track Foobar2 in the full-screen mode:

editor -f 1 tracks/foobar2.trk


USING EDITOR

  The editor has four edit modes: tile mode (F1), control point mode (F2),
object mode (F3) and lightmap mode (F4).

  In the tile mode, tiles can be selected, rotated and added with 
the arrow keys (with or without shift+ctrl) and mouse. Last
addition can be deleted with backspace. Space performs "add tile
before the last tile". That can be used in special cases. Holding
alt when moving mouse keeps x or y coordinate fixed. Many tiles
have precalculated lighting which does not allow them to be
rotated.

  In the control point mode, new control points can be added by
clicking two points in the track. The control points are either
vertical or horizontal line segments which the cars must pass
in the correct order to complete a lap. The first control point
is also the starting line. Make sure that there is enough space
for the starting grid (do not place any obstacles in it).

  Object mode is like tile mode. Objects are bridges and such special
tiles which are drawn on top of other tiles.

  Lightmap mode can be used to modify the appearance of the track
by editing lightmap on the track. There are four parameters that
can be changed with keys s, f, d, e and arrows.

  In pit mode, you can specify the track pit by giving two of its 
corners. If you need to add more pits or non-square pits, you need 
to define your own pit terrain type (with line "pit 1") and use it 
(in addition to having the square pit).

  In track type mode, you can specify that the track is either 
a PunaBall track or a battle track. Control points have a different
meaning in different modes. Read README-punaball.txt and 
README-battle.txt for more information.

  The track is saved with F6.


TIPS

  If the track maker is not correct, you can edit it with any 
text editor in the trk file.

  If you rename a track, you must open and save it with the editor
at least once. Otherwise, the pattern file is not used, since
the trk file has reference to the old name. This makes track profile
unavailable and may cause track record problems.

  To get curves look better, first add a curve tile, then add
straight track tiles below the curve tile by using spacebar.

  Use Alt key frequently to be able to put tiles on the same line.


REQUIREMENTS FOR A GOOD TRACK

  Using the the editor may seem a bit awkward but you will have to
cope with it before someone makes a better one :-). Before you 
actually release any tracks, it would be good if you first made
some test tracks to see what kind of difficulties you will have. 
Here are some simple requirements for good tracks:

1) Make sure that your track looks good in different zoom levels 
   and/or screen modes.

 Unfortunately, the graphics library that is used by the game sometimes
rotates tiles oddly. This can cause the track to look a bit broken
on different zoom levels. To remedy this, you must finish your track
by looking it at different modes and trying to fix things that
look bad. After having done the track in the default 1.0 zoom level,
try zoom 2.0 (command line option -scale 2.0). Fix things that look
bad, then do the same with 0.6, 0.8, 1.2, 1.4, 1.6 and 1.8. If you aim for 
perfection, you can also check the track with different screen modes
(for example, -x 1024 -y 768 or -x 480 -y 300). This may be a real pain 
in the ass but after all, it should not take that much time compared 
to what making a good track has already taken :). Also check the pattern 
file. Especially, see that there are not any small areas of grass where 
there should be tarmac (as is the case with some of the original tracks).

2) Make sure there are not any shortcuts

  Place your control points so that there are not any shortcuts. 
Also, try to make to control points in turns such that it is not easy 
to accidentially miss a control point (for example, put a solid 
obstacle in the inner curve and make the line long enough so that
it is not possible to go around it).

3) Do not make your track too far out

  As you can do whatever terrains or tiles you want (see the next
chapter), it is possible to do very odd tracks. This may seem funny
but no one probably wants to actually play such a track for a long
time. Creativity is of course good, but try not to make the rules
of your track too different from the other tracks. 

  One special concern: collision checking for records may not work 
correctly in a track if it contains terrains whose acceleration/viscosity 
is more than 1.0. (There is a good reason for this, believe me). So, if 
you really want to use such terrains, remember that you have been warned.


CREATING YOUR OWN TILES

  Making your own tiles is possible and even encouraged. However, you may 
skip this chapter, if you do not intend to do so.

  The files tiles.til and terrains.ter in the data directory contain
information on how to create your own terrain and tile files.
If you have created your own tiles file and some png files that are 
used by your tiles, proceed as follows: Create a new track directory 
under the tracks directory. Copy your tiles file and the graphics files
to that directory. Then, start editing a new track in that directory:

  editor -tx 960 -ty 600 tracks/newdir/newtrack.trk

  Save this track and edit the track. Using some text editor (Notepad 
or something else), edit the "include tiles.til" tome something else
to include your own tiles file instead. Try to use file names that 
the others would not choose to minimize the possibility of colliding 
file names. Note that the tiles file and any image files it might use 
must be in the same directory as the track file. Save the track file, 
and from now on, when you open the new track with the editor, your own 
tiles are used:

  editor tracks/newdir/newtrack.trk

  NOTE: Only use file extensions trk, til and ter for data files and
basic image extensions (png, gif, jpg, jpeg) for images. Otherwise, 
the other people may not be able to automatically download the tracks 
from a server.

  If you want to use the default tiles, too, the preferred way to handle
this is to make your own til file include that first. The main trk file
can also have more than two Includes in it, but editor will only save
the first two of them if the track is saved again. 

  If you want to make distributing your tracks easier, you can also
manually copy'n'paste the contents of your include files to the
final version of the track instead of the Include directive. That
way, it is enough to use send the trk and pat file and not have to also 
transfer the include files.


DISTRIBUTING YOUR TRACKS

  If you have used your own tiles or other non-standard data files, 
pack your files so that when they are unpacked, they are unpacked
in a directory. If you have included your own tiles or graphics,
include a README.txt file which tells how the tracks are used 
(simple unpacking instructions) and if it is ok to for other
people to use/modify/distribute/sell those tiles or graphics.
Tracks are also automatically transfered to other players, if you
host a server with your tracks.

