Building tracks for the next Microracers generation
This document is an introduction to the model of track
building used by CVS that will replace the current one on the next 0.3 major version.
Old tracks building: tracks are build as two big images, one of
the track itself, the other with the terrain information, and another
INI-like text file to setup checkpoints and stuff.
New track building: tracks are build up from an array of
images, that range from a piece of a road to a stone obstacle. These
images are then assembled together in a graphical track editor and can
be reused over and over again. Advantages are obvious:
- polishing track graphics and objects position is a major
work, but not so with this model, which will result in better looking
and more fun tracks;
- anyone can make a new track with no big effort, which will result
in a hell lot more tracks (having more vehicles than tracks is kinda of
lame :-/);
- making a track isn't as time consuming and bug-prone, since you
don't have to do the terrain types image and checkpoints are easy to
add.
Individual images, let's call them Objects, should feature:
- information about its terrain type;
- support for pixel-level collision;
- displaying in foreground and alpha blending;
- optional animation;
- Objects can also be special images, that can be invisible or not, for such things as checkpoints and startpoints.
Something to be discuted is the standard size of the Objects and the
style of art. Anyway, this could be left for the themes' authors
to decide.
For the purpose of this article, I've done a track building scratch example:
First we have to have a theme of Objects, in order to then be used in the track:
Using the track editor, one can then assembly these Objects into forming a track:
The track editor outputs a text file with the position of the
Objects that are then red by the game. Each Object also
has a text file stating its proprieties. Only the Object file
needs to be manually edit, but it is small, trivial and only done
once work. You should also be able to just copy and past the file of other
Object with the same attributes.
If you have artistic skills and are excited about this new model for building tracks, please get CVS, then join the mailing list and don't hesitate to contribute! ;-)
Programmers or just plain players are also welcome!