Re-Volt I/O

RVGL Documentation

About RVGL

RVGL is a cross-platform rewrite / port of Re-Volt that runs natively on both Windows and GNU/Linux. It’s powered entirely by modern, open source components. Work in progress.

Send us your feedback at The Re-Volt Hideout.

General

Features at a Glance

Languages

Language files are placed in the game’s strings folder. Text files placed in the folder are automatically detected by the game. Additional details about the language can be specified using an appropriate escape sequence.

These details are typically added to the end of the language file, though they can occur anywhere in the file. Below is a sample taken from french.txt:

\LNFrançais
\LCfr

As of version 18.1110a, RVGL supports and uses UTF-8 encoding for the language files and other text based configuration files. For more detailed information about Unicode support, see the section on Internationalization.

The following languages are currently included: Basque, Czech, Dutch, English, French, German, Hungarian, Italian, Lithuanian, Polish, Portuguese, Romanian, Serbian, Slovak, Spanish, Swedish and Turkish.

RVGL’s localization project is hosted at rvgl-strings on GitHub.

Profiles

Save files are located in the profiles folder. RVGL has a global settings file named “rvgl.ini”. Profile specific settings are saved to “profile.ini” within the player’s profile folder (eg., profiles\marv\profile.ini). Profile names are capitalized in-game. The player’s profile folder also contains game progress.

Best times and lap records of all players are saved in the times folder. Replays are saved in the replays folder.

As of version 18.1110a, player names and profile names accept international characters through Unicode support. Because of the UTF-8 encoding used, however, this can limit the number of typeable characters.

Soundtrack

Original Soundtrack (Dreamcast version) is available along with the game assets from the Downloads page.

If you have a retail Re-Volt CD, you can rip the soundtrack yourself. RVGL supports soundtrack from the PC, Dreamcast and PSX versions.

The PSX soundtrack is considered the best one for gameplay, as it has tracks stitched together for seamless playback, and the Dreamcast one is considered the most complete.

Dreamcast Mode

Additional content from the Dreamcast version is available in RVGL as an optional download. This adds the Rooftops level and 14 additional cars to the game. The Championship cups and carboxes layout are preserved from the original PC version.

If you grew up playing Re-Volt on Dreamcast, you now have the option to enable Dreamcast layout for the Championship cups and the carboxes at the selection screen.

Some of the additional cars have alternate skins based on the PSX version. These can be selected from the Car Preview screen.

Multi-Player

RVGL supports up to 16 players in Single Race or Battle Tag mode, plus 8 additional slots for spectators, resulting in a total of 24 connections in a direct Peer-to-Peer network. Spectators can join once slots free up.

RVGL utilizes UDP hole punching to connect players behind NAT. In most cases, no port forwarding is required for clients. The host is required to forward port 2310 (UDP) to be able to accept incoming connections.

Hybrid P2P: In cases where a direct connection is not possible between certain players, RVGL is capable of linking the affected players together through multicasting (i.e., messages between these players pass through the host). This happens automatically and provides the best possible connection between players.

Waiting Room commands:

In-Game commands:

The Back To Lobby in-game menu option can be used to go back to Frontend without quitting the online session. This allows players to change their name and car. It also allows the host to re-launch the session with new settings, such as different number of laps. This feature was added in version 18.1110a.

Discord Rich Presence:

Multi-Player games can be announced and joined directly from Discord chat. Rich game data including game cover-art and gameplay state is advertised in a Discord user’s profile. To be able to launch games directly from Discord, a custom URI is registered during the RVGL setup. To manually register the URI, run RVGL with the -register command line. To customize the URI further, see the Platform specific sections. A running Discord Desktop client is required. This feature was added in version 18.0731a.

Visit the community’s official Discord server.

The Windows versions support DirectPlay lobby applications like GameRanger or GameSpy Arcade. Support for this is provided in dplobby_helper.dll.

Options

Advanced Options

These options are accessible only by editing the game configuration files.

A log file is generated at profiles\re-volt.log. Running the alsoft_log script also generates an OpenAL info log at profiles\alsoft.log.

NLaps can be set up to 255 by directly editing the player’s profile.ini. Similarly, NCars can be set down to 1 (i.e., race alone for testing purposes). In that case, any race wins are not considered for progress.

Keyboard Commands

Toggle Fullscreen: F11 switches between Fullscreen and Windowed mode instantly.

Screenshot: F8 automatically saves screenshots from the game. The screenshots are timestamped and saved in the profiles folder in PNG format.

Find / filter cars and tracks at the selection screens using the Keyboard. The search is automatically activated on typing.

Search Starts with…
Type eg., “TOY”, and it selects the first car whose name starts by TOY (likely the TOYECA). As long as this search is active you can navigate with the Left / Right keys amongst all cars whose name starts with TOY. To cancel search, press Esc. If navigation is impossible or the search has no match, it produces a blocking sound.

Search Contains…
If you want to search for a word included in the name but not necessarily at the beginning, just press the “*” key, and now if you type SLUG it will find all occurrences that match the wildcard search “*SLUG*”, for example Phat Slug.

Commands

Controllers

The SDL2 GameController API is used to provide support for modern game controllers like the Xbox 360 and PS3 Controllers. This means Triggers can be selected along with other axes. Axis and Button names are displayed in the Controller Config menu for these devices. A GameController mapping database is included that supports various controllers “out of the box”.

Controller GUIDs and mappings are logged at game start. This can be useful for adding your own GameController mapping in case one is not available for your controller. Custom mappings are sourced from profiles\gamecontrollerdb.txt.

GameController mappings can be generated interactively. For Windows / Linux, use the SDL2 Gamepad Tool by General Arcade. For Android, use the RVGL Controller Map app (see the Android section).

Renderer

As of version 18.0428a, there is support for a new rendering engine based on programmable shaders, targeting OpenGL 2.0+, ES 2.0 and 3.1+ Core Profile. This shader-based rendering mode is expected to have significantly improved performance on modern GPUs and better power efficiency on laptops and mobile devices.

As of version 18.1020a, the shader-based render is used by default. To switch back to the fixed pipeline renderer, edit rvgl.ini and set Shaders = 0. This is applicable to both Desktop and Mobile versions.

OpenGL Functionality:

RVGL has support for new OpenGL functionality that takes advantage of newer hardware. Some of these options are only applicable when the shader-based renderer is active.

Support available for these features can be verified from the “Video Info” section in profiles\re-volt.log.

OpenGL Profiles:

Advanced users can select one of the supported OpenGL Profiles by setting the Profile key in rvgl.ini. Some of these profiles are only applicable when the shader-based renderer is active. The following values are supported:

  1. Compatibility profile: Initialize a backwards compatible OpenGL profile (the default).
  2. Core profile: Initialize a 3.2+ Core profile. Only applicable when shader mode is active. In some cases, driver support may be better when using a core profile.
  3. ES profile: Initialize an OpenGL ES profile for Embedded Systems. Requires a mobile GPU or driver support for ES emulation. Depending on whether shader mode is active, this will initialize either GLES 1.1 or GLES 2+.
  4. ES Driver profile: On Windows, initialize an OpenGL ES 2+ profile using the ANGLE Direct3D implementation included with RVGL. Only applicable when shader mode is active.

Internationalization

As of version 18.1110a, RVGL uses Unicode (UTF-8) encoding for the game internals and all text content. The game is also capable of reading Unicode filenames through UTF-8 on Linux and Android, and Wide Character support on Windows.

Text files that are not in valid UTF-8 encoding are assumed to be ASCII (Windows-1252) and converted accordingly to UTF-8.

The re-designed game font provides support for various commonly used Latin alphabet sets and diacritics. The following Latin alphabets are considered fully supported: English, French, German, Italian, Spanish, Portuguese, Dutch, Danish, Norwegian, Swedish, Finnish, Estonian, Hungarian, Basque, Romanian, Polish, Lithuanian, Latvian, Czech, Slovak, Croatian, Bavarian, Welsh, Livonian, Turkish and Vietnamese.

Further, the following alphabets are supported through standard romanization schemes: Indic (IAST, NLK and ISO 15919), Cyrillic (ISO 9 and language-specific standards), Greek (ISO 843), Georgian (ISO 9984), Armenian (ISO 9985), Arabic (ISO 233) and Hebrew (ISO 259).

Below is a complete list of international characters supported by the game:

Launch Parameters

You can start RVGL via command-line or shortcuts with the following parameters:

-aspect <width> <height> <lens>
Changes the display aspect ratio and fov (default 512).

-autokick
Automatically kicks players who use altered cars (parameters.txt) or track files. Cars and tracks are compared with the ones used by the host. (Added in version 17.1009a.)

-chdir <path>
Set the working directory to <path>. (Added in version 19.0301a.)

-cubevisi
Performs simpler visibox computations for rendering.

-gamegauge
Launches game gauge benchmarking mode.

-gogodemo
Launches the game in demo mode.

-hidechat
Set to hide in-game chat messages. These can be seen later by pressing TAB or F12. (Added in version 19.0320a.)

-lobby <ip address>
Launch the game and directly connect to a lobby. <ip address> can be the host’s IP, 0 (to search for local sessions), or entirely omitted (for launching the host).

-multisample <num_samples>
Initializes a multisampled opengl window without framebuffer objects.

-nodemo
Disables screensaver activation at main menu. (Added in version 19.0120a.)

-nogamma
Disables gamma correction.

-nointro
Disables the intro.

-nolatejoin
Set by the host to prevent new players from spectating an ongoing race. Helps conserve bandwidth. (Added in version 19.0414a.)

-nomulticast
Set by the host to disable multicasting in P2P mode. Helps conserve bandwidth. (Added in version 19.0414a.)

-nop2p
Set by the host to disable P2P and use centralized connection mode.

-nopause
Keeps the game running even when it’s in the background.

-nores
Disables display mode change in fullscreen. (Added in version 20.0325a.)

-noshader
Force the legacy fixed pipeline renderer. (Added in version 18.0428a.)

-nosound
Launches the game without sound/music.

-nouser
Disables custom content.

-nousercars
Disables custom cars. (Added in version 20.0210a.)

-nouserlevels
Disables custom levels. (Added in version 20.0210a.)

-nousersfx
Disables custom car sounds. (Added in version 20.0210a.)

-nouserskins
Disables custom car skins. (Added in version 20.0210a.)

-pass <phrase>
Protect the session with a password. The passphrase can be up to 255 characters in length and cannot contain spaces. (Added in version 18.0310a.)

-port <port>
Overrides the LocalPort setting in rvgl.ini. (Added in version 17.1009a.)

-printlog
Print the contents of the re-volt.log file to the terminal or console.

-profile <name>
Skip the profile selection menu and directly load the profile from folder name. If <name> is omitted, load the last used profile.

-register
Register the game for lobby launching support. It’s currently used for registering a custom URI for the Discord client. (Added in version 18.0731a.)

-res <width> <height> <bpp>
Forces a fullscreen resolution.

-savereplays
Automatically save replays in select game modes. (Added in version 19.0210a.)

-serverport <port>
Overrides the port that the server listens to (default 2310). When the host uses a custom server port, all clients will need to use the same server port to be able to connect to that host. (Added in version 18.0310a.)

-sessionlog
Saves race results and event logs (such as chat messages) to the profiles folder as timestamped .csv and .log files. (Added in version 17.1012a.)

-showping
Access ping display in Multi-Player mode with Ctrl + P. (Added in version 19.0210a.)

-sload
Disables the loading screen.

-window <width> <height>
Launches the game in window mode. Specify width and height optionally. The default size is half the desktop dimensions.

Dev

-dev
Launches the game in developer mode and enables edit modes and debug features.

-editscale <s>
-editoffset <x, y, z>
Changes scale and offset of the in-game editor, all floating point values

-gazzasaicar
Gazza’s AI car. Have the player’s car driven by AI and control AI cars with Up / Down and Right Ctrl. To be used in conjunction with -dev.

-gazzasaiinfo
Gazza’s AI info draw. Display debug info related to AI nodes and car AI computations. To be used in conjunction with -dev.

-gazzasroute
Gazza’s AI route choice. Additional debug options to force the route decisions taken by AI cars. To be used in conjunction with -dev.

-texinfo
Shows the maximum texture size supported by the GPU.

Legacy

-alpharef <0 to 255>
Reference value for alpha testing (default 128).

-noforce
Don’t use force feedback of controllers.

-nomip
Disables mipmaps.

-nostars
Disables stars in Museum 2’s planetarium.

OS Specifics

Windows

RVGL for Windows is provided in an installer format. The installer sets the necessary registry entries and file permissions, and optionally creates a Desktop shortcut.

The Windows versions support DirectPlay lobby applications like GameRanger or GameSpy Arcade. Support for this is provided in dplobby_helper.dll. Running the setup also ensures that the game is properly detected by lobby applications.

Running RVGL in Administrator mode is not necessary and not recommended.

Direct3D Backend

On Windows systems with poor or non-existent OpenGL support, RVGL can take advantage of Google’s ANGLE project which provides a compliant OpenGL ES implementation based on Direct3D9 or Direct3D11. To use this support, edit rvgl.ini and set Shaders = 1 to enable the shader-based renderer, then set Profile = 3.

You can verify whether the Direct3D backend is being used by checking the video info in profiles\re-volt.log. Below is a sample output:

GL Vendor: Google Inc.
GL Renderer: ANGLE (AMD Radeon™ R4 Graphics Direct3D11 vs_5_0 ps_5_0)
GL Version: OpenGL ES 2.0 (ANGLE 2.1.0.54118be67360)

Discord URI

RVGL registers the custom URI discord-472158403830218762:// for Discord Rich Presence integration. The registration is done only once during the RVGL setup. To customize the URI, eg., to set various launch parameters, edit the registry key at:

HKEY_CURRENT_USER\Software\Classes\discord-472158403830218762\shell\open\command

The "%1" at the end of the path is a required parameter. The default URI can be re-registered by running RVGL with the -register command line.

GNU/Linux

Install RVGL by running the setup script included with the game. The setup converts all game files to lower case, adds necessary executable permissions, and installs an application launcher to ~/.local/share/applications.

The game itself is provided as a launch script that auto-detects the system type and launches the appropriate (32-bit or 64-bit) executable. The script attempts to automatically resolve dependencies by using libs included with RVGL in place of any missing libs. This allows the game to run without any manual configuration on a wide range of systems as long as the OpenGL drivers, SDL2 and SDL2_image are installed.

All game files need to be in lower case. To repair file names after installing custom content, run the fix_cases script. Starting from version 18.1020a, these scripts are written to target Bash 4.

Required Packages

# Debian / Ubuntu
sudo apt install libsdl2-2.0-0 libsdl2-image-2.0-0
sudo apt install libopenal1 libenet7 libunistring2
sudo apt install libjpeg8 libpng16-16 libtiff5 libwebp6
sudo apt install libvorbisfile3 libflac8 libmpg123-0 libfluidsynth1

# Arch Linux
sudo pacman -S sdl2 sdl2_image
sudo pacman -S openal enet libunistring
sudo pacman -S libjpeg libpng libtiff libwebp
sudo pacman -S libvorbis flac mpg123 fluidsynth

# Fedora
sudo yum install SDL2 SDL2_image
sudo yum install openal enet libunistring
sudo yum install libjpeg libpng libtiff libwebp
sudo yum install libvorbis flac mpg123 fluidsynth

Discord URI

RVGL registers the custom URI discord-472158403830218762:// for Discord Rich Presence integration. The registration is done only once during the RVGL setup. To customize the URI, eg., to set various launch parameters, edit the Desktop entry at:

~/.local/share/applications/discord-472158403830218762.desktop

The "%u" at the end of the path is a required parameter. The default URI can be re-registered by running RVGL with the -register command line.

Android

Locating the data path

The following locations are supported:

/sdcard/RVGL
/storage/sdcard0/RVGL
/storage/sdcard1/RVGL
/storage/emulated/legacy/RVGL
/storage/emulated/0/RVGL
/storage/emulated/1/RVGL
/storage/extSdCard/RVGL

If you already ran the app, it should have automatically generated an RVGL folder for you with updated assets. In this case, extract the full game data into this folder, taking care not to overwrite any of the existing files (i.e., say NO to replace).

Generated files

Improving performance

The Shader Edition might benefit from level world (*.w) files optimized with WorldCut to have larger sized meshes. These can be downloaded from here. As of version 18.1126a, optimized level files are included in the app package.

Gameplay tips

Native Multisampling

Native multisampling is very fast on embedded GPUs and enjoys wider support:

However, native multisampling cannot be configured in-game from Render Settings. It must be set directly in rvgl.ini through the Antialias key. It’s usually safe to set it to 2 or 4. The behavior is undefined when an unsupported value is used. The currently used Antialias level can still be checked from Render Settings.

The alternative is to use Frame Buffer Objects for multisampling, which can be quite slow on embedded GPUs. Because of the performance benefits, FBO is disabled by default on Android.

Controller Map

Available as a separate optional download, this app allows you to generate SDL GameController mappings for your controllers interactively. Once configured, the mappings are automatically saved to profiles/gamecontrollerdb.txt and is used by the game upon next start.

Command Lines

As of version 20.0210a, it is possible to launch the app from adb shell with optional command line arguments, set through a string extra called args.

am start -n com.rvgl.rvgl/.RVGLActivity -e args "-nointro -lobby 1.1.1.1"

Dev Mode

Below, you can find technical information that is intended for modders, track makers and car makers.

Working with tracks and cars is more convenient in Dev mode. This is a special mode that enables several advanced features for car / track making, including MAKEITGOOD and TVTIME cheats. To access this mode, run RVGL with the -dev command line.

Enabling Dev mode flags your cars as CHT. Avoid using it for normal gameplay.

Options

These options are available only in Dev mode.

Calculate Car Stats: This game mode, accessible from the Start Race menu, allows you to calculate the speed and acceleration of your car for the stats display. Page Up / Page Down allow you to change the car and restart the test run.

Save Current Car Info: Use this in-game menu option to re-save the current car’s parameters.txt info. The saved file is up to date with all supported entries. Original cars are signed to ensure that they are not treated as CHT.

Edit Mode: Select the edit mode for the in-game editor from the Start Race menu. As of version 20.0210a, it is now possible to change the edit mode on the fly from the in-game menu.

Commands

These commands work in Dev mode, some commands may also work by manually entering MAKEITGOOD edit mode or other appropriate cheat codes.

Preview Objects: In Objects edit mode, press Ctrl + P to preview object animations instantly, then use the same command to get back to editing. The same shortcut is used to preview / refresh visiboxes.

Cheat Codes: Certain cheats such as TVTIME (F5, F6 cameras) or CHANGELING (Page Up / Page Down to change car) are enabled in Dev mode. It is also possible to disable previously enabled cheat codes by adding an ‘!’ at the end.

Show Camera Position: Press Right Shift + F9 to show position and direction of the camera. This can help set the required StartPos and StartRot values in the level *.inf file, by placing the camera at the start line and noting the camera values.

Toggle Camera Speed: Use Caps Lock to toggle the camera movement speed and the zoom speed when using scroll wheel.

Keep game running in background: Press Shift + F9 to keep the game running when it’s not focused. This is similar to the -nopause command line.

Hide HUD and Menus: Shift + F5 hides the HUD. Shift + Ctrl + F5 hides the in-game menu. This can help with taking screenshots of your car or track.

Full Track Reload: Restarting the level does a full reload in Dev mode.

Instant Car Refresh: Press Ctrl + R to refresh the current car. This allows you to quickly make changes to the car parameters and data and view those changes in-game. This works both at the Frontend selection screen and in-game.

Camera Edit Mode: Press Ctrl + C to interactively edit the Hood / Rear view camera parameters. Use Numpad keys to move the camera and hold down Ctrl for more precise movement. Right Ctrl + F11 and Right Shift + F11 cycle through the available Follow and Attached cameras, respectively.

Network Ping: In multiplayer sessions, ping and traffic information can be checked from the debug display in Dev mode or with -showping (Ctrl + P).

Modern Editor

As of version 19.0907a, there is optional support for a modern editor scheme and alternate camera controls. These options can be enabled from the [Editor] section in rvgl.ini.

Common Tools

The modern editor contains new tools that perform Translation, Rotation and Scaling in a much more intuitive way. These manipulations can be axis-constrained (one, two or all axes) and set to occur in World or Object space.

Pos Nodes

Hold Alt = Changes to “Alt” mode.

AI Nodes

Shares similar controls with the Pos Nodes editor.

Hold Alt = Changes to “Alt” mode.

Camera Nodes

Shares similar controls with the Pos Nodes editor.

Track Zones

Force Fields

Triggers

Visiboxes

Instances

Objects

Textures

Applies to both cars and tracks.

Texture Size

Supports standard texture sizes that work with any graphics card. Your texture has to be square (i.e., same width and height) with power-of-two dimensions (like 256x256, 512x512, etc.). The maximum supported texture size depends on your graphics card.

The legacy Re-Volt versions only support 256x256 textures. To learn how to make your content backward compatible, see the Mipmaps section below.

Mipmaps

Mipmaps are low resolution copies of the main texture. Mipmaps improve both the performance and visuals of your content, especially when used with hi-res textures.

Up to 10 mipmap levels can be used, each level must be half the size of the previous level and named with a different “.bmp” extension - the last character keeps increasing. (eg., a 256x256 “texture.bmp” will have a 128x128 “texture.bmq” file as the first mipmap level and a 64x64 “texture.bmr” as the second mipmap level).

We also support the use of mipmaps that go upward (i.e., with the above mentioned example, you may include a hi-res 512x512 version called “texture.bmo”). By including your hi-res texture this way, you will be able to keep the actual “texture.bmp” file at 256x256 and enable your content to be played in legacy Re-Volt versions.

For a quick reference, here is a list of supported sizes and their corresponding file names, as per the above example:

      8192 x 8192   -   texture.bmk
      4096 x 4096   -   texture.bml
      2048 x 2048   -   texture.bmm
      1024 x 1024   -   texture.bmn
       512 x 512    -   texture.bmo
     [ 256 x 256    -   texture.bmp ]
       128 x 128    -   texture.bmq
        64 x 64     -   texture.bmr
        32 x 32     -   texture.bms
        16 x 16     -   texture.bmt
         8 x 8      -   texture.bmu
         4 x 4      -   texture.bmv
         2 x 2      -   texture.bmw
         1 x 1      -   texture.bmx

Intermediate mipmap levels cannot be skipped. For example, you cannot include a texture.bmp" (256x256) and a “texture.bmn” (1024x1024) without a “texture.bmo” (512x512) inbetween.

Texture Sets

Mipmaps also find use as “texture sets”. The game will pick textures of the appropriate size to load, depending on the available system resources. Therefore, it is always recommended to include appropriate mipmap levels for your content.

Use the -texinfo command line to display the texture sets info that was detected for your system.

Alpha Transparency

Textures with an alpha channel for transparency data is supported. The supported formats are 32-bit BMP (ARGB8888) and PNG.

Alpha channel transparency can be used to create rich and varied effects, eg., transparency gradients and well anti-aliased shapes. Colorkeying is disabled when using transparent textures, which means pure-black color (RGB 0,0,0) can be used on opaque surfaces.

Care should be taken to save your alpha-enabled texture in the ARGB format. Some other 32-bit BMP formats, such as XRGB, do not save the alpha channel in the extra space. This will result in a fully transparent texture in-game.

Additional Texture Formats

RVGL supports several additional texture formats. For historical reasons, the textures should still be named with the .bmp extension (and mipmaps with .bmq, .bmo, etc. as usual).

Available formats: BMP, PNG, JPG, WEBP, TIF, GIF, SVG, CUR, ICO, LBM, PCX, PNM, XPM, XV, XCF.

Support for XCF (GIMP’s native format) is experimental. This allows you to visualize a GIMP project file in RVGL without exporting it. However, this is not guaranteed to work correctly in all cases.

Support for SVG was added in version 18.1020a.

For Car Makers

Customize user cars through new entries in the car’s “parameters.txt” file.

For compatibility with the original versions of the game, the “parameters.txt” specification supports a comment closer. This is a closing paranthesis following the semi-colon, or ;). Prepending this at each line causes the line to be skipped by the original versions while it is still read by RVGL. A line can be included twice, first without the comment closer and then with. Eg.,

Rating      4  ; Pro in original version
;)Rating    5  ; Super Pro in RVGL

Carbox Art

To add a box-art image to your car, use the TCARBOX parameter. This entry works the same way as the TPAGE parameter. General syntax:

TCARBOX    <path to carbox texture>


It is recommended that the carbox texture use a pure white (RGB 255,255,255) background.

Custom Car Sound

The keyword SFXENGINE adds a custom engine sound for your car. The way the engine sound is used by the game depends on the car class (Electric or Glow). The keyword SFXHONK adds a custom horn sound. The keyword SFXSERVO adds a custom servo sound (i.e., wheel turning effect).

General syntax:

SFXENGINE    <path to wav file>
SFXHONK      <path to wav file>
SFXSERVO     <path to wav file>

Custom Shadow

Each car can have its own shadow map, or it can use one of the preset stock shadows (useful for default car repaints).

The shadow map is generally a 64x64 texture containing a white silhouette of the car on a black background. They can be generated from the top view of the car (preferably from a 3D modeller) and then post-processed in an image editor.

RVGL requires 5 coordinates to position the shadow under the car. These are the Left, Right, Front and Back edges and Height relative to the model center. These values are independent of the car CoM and do not need to be updated upon changing the CoM.

Parameters to be added:

General syntax:

TSHADOW        <path to shadow texture (or) NONE>
SHADOWINDEX    -1  ; 0 to 27, (or) -1
SHADOWTABLE    -10.2 10.2 30.4 -30.4 -4.2

Stats Display

User-made cars can show the Speed / Acceleration / Weight bars in the car selection screen.

To use this feature, calculate and fill in the TopEnd and Acc parameter values using the Calc Car Stats option in Dev mode. Weight takes the same value as the car mass. RVGL also requires the Trans parameter to be properly filled in.

Then, add the following line in the Frontend section of the parameters file.

Statistics     TRUE

TopEnd gives the maximum top-speed that can actually be reached by the car. Acc gives time, in seconds, the car takes to reach the top speed.

Hood & Rear Camera

Configure the Hood and Rearview cameras for your car by adding the CAMATTACHED section in your parameters file. Below is a sample:

;====================
; Camera details
;====================

CAMATTACHED {  ; Start Camera
HoodOffset     -0.12 -71.81 -60.01  ; Offset from model center
HoodLook       0.02  ; Look angle (-0.25 to 0.25, 0.0 - straight)
RearOffset     -0.12 -71.81 27.24
RearLook       0.03
FixedOffset    true               ; Is offset fixed or moving
FixedLook      true               ; Is look fixed or moving
}              ; End Camera

Camber Angle

Configure the camber angle for each wheel of your car using the Camber entry. This sets the rotation angle (in degrees) of the wheel along the Z axis. General syntax (in each WHEEL section):

Camber    -10

The camber sign is automatically adjusted for left / right wheels. A negative Camber value makes the bottom of the wheel farther out than the top.

Special Effects

Enable Rotor, UFO or Mystery effect for your user car by adding new parameters in the “Handling related stuff” in the parameters file. General syntax:

Flippable      FALSE  ; Rotor car effect
Flying         FALSE  ; Flying like the UFO car
ClothFx        FALSE  ; Mystery car cloth effect

Flying CPU cars will be able to steer in the air.

Mystery car effect will also need modification to the car mesh to flag the polygons that form the edges of the cloth.

To use Panga affect (i.e., head turning and ducking according to speed), modify the SPINNER section. Further, you can use rotation only, ducking (translation) only, or both. General syntax (in the SPINNER section):

Type           0  ; 1: Default rot, 2: Turn with steer, 
                  ; 4: Translate with speed, 6: both 2 and 4
Trans          0.000000 3.000000 6.000000  ; Translation max
TransVel       0.001000  ; Velocity factor

Unlike in legacy versions (eg., default Panga car) where AngVel was zero to make the spinner turn with steer, now AngVel specifies the speed of turning, so it should be non-zero. An AngVel value of zero denotes that the spinner doesn’t turn at all.

CPU Selectability

Disable a user car for CPU selection by adding the CPUSelectable parameter in the “frontend and selectability” section in the parameters file. General syntax:

CPUSelectable  FALSE

Car Classes

As of version 20.0210a, there are new Rating and Obtain values. Set Rating to 5 to add a Super Pro car. These are a class of cars faster than Pros. Set Obtain to 5 to unlock the car upon completing Stunt Arena. General syntax:

Rating         5  ; Skill level (0-5)
Obtain         5  ; Obtain method (0-5)

Car Skins

Additional skins can be added for each car, selectable at the Car Preview screen. Skins are detected based on a suffix system, i.e., if the TPAGE points to ‘car.bmp’, then ‘caror.bmp’, ‘car1.bmp’ and ‘car-bleh.bmp’ are valid skins. Files that start with the TCARBOX filename are skipped. The length of the skin suffix is currently limited to 11 characters.

As of version 18.1110a, skins are randomized for CPU cars and in Random Cars mode.

For Track Makers

Customize user-made tracks through new entries in the level *.inf file and the extensive custom folder support.

End Position

New ENDPOS key for use with Sprint tracks. This is only applicable when GAMETYPE is 4. Upon changing either the STARTPOS or ENDPOS, the AI Nodes and Pos Nodes must be re-saved.

ENDPOS    -17784 -8846 -90895  ; End position coordinates

For reversed variants, there is an ENDPOSREV for consistency, though it is recommended to use a dedicated reversed *.inf file instead, simply using ENDPOS.

Added in version 19.0907a.

Starting Grids

New 3-car wide STARTGRID with type numbers 4 and 5 have been added for use in custom tracks.

STARTGRID    4  ; Grid type (0 - 5, type 2 reserved for frontend)

Difficulty

A custom track’s difficulty can be set by adding the following line to the track’s *.inf file:

DIFFICULTY   1  ; Display difficulty (0:Unknown, 1:Easy, 2:Normal, 3:Hard, 4:Extreme)

Added in version 17.1009a.

Challenge Times

User-made tracks can now set challenge times to be beaten in Time Trial with new level *.inf keywords CHALLENGE and CHALLENGEREV. General syntax:

CHALLENGE       0 54 0  ; Time in <min sec ms>
CHALLENGEREV    0 52 0

Added in version 18.0330a.

Sweep Camera

The starting grid zoom camera can be enabled for a custom track by setting the following line to the track’s *.inf file:

SWEEPCAM     1  ; Sweep camera (0:Disabled, 1:Enabled)

Added in version 20.0210a.

Texture Properties

Set various per-texture properties for the level using the TEXTUREPROPS keyword, followed by four values specifying the texture index (0-63), mipmapping (0-disable / 1-enable), wrap mode (0-clamp / 1-repeat) and colorkeying (0-disable / 1-auto). General syntax:

TEXTUREPROPS    3 1 0 1  ; Index - mipmaps - wrap mode - colorkey

For example, use ‘TEXTUREPROPS 1 1 1 0’ to make texture page B use mipmapping, support mapping outside the boundaries and disable colorkeying (no pure-black transparency).

The colorkey attribute is used to hint that the texture doesn’t require alpha testing. There is, however, no guarantee that alpha testing is actually disabled.

Added in version 18.0428a.

Rock Type

There is a new level *inf keyword ROCKTYPE, which can be 0 or 1. The default 0 can be used for ship levels, 1 can be used for water surfaces (Boat tracks).

ROCKTYPE    0  ; Rocking type (0:Ship, 1:Water)

Deprecated. New tracks should set rockiness properties in the properties.txt GRAVITY section instead. See the Gravity section.

Added in version 16.0420a.

Custom Music

To play custom music in your level instead of the default soundtrack, use the MUSIC entry in the level .inf file. General syntax:

MUSIC    <Path to music file (or) folder>

As of version 19.0330a, the path accepts either a single file or a folder containing music tracks. If a folder path is provided, the game selects a music track from the folder to be played at random. Supported formats are Ogg (recommended), Flac, MP3, WAV and MIDI (experimental).

This entry was previously called MP3 which is now a deprecated keyword. The MUSIC keyword is recommended for new tracks.

If both MUSIC and REDBOOK lines are present in the inf, MUSIC has higher priority for custom tracks.

Experimental MIDI support was added in version 18.1020a. This requires a SoundFont placed in the soundfonts folder, with the name default.sf2. Not supported on Android.

Game Modes

Practice: User tracks can be played in Practice mode. Add a single star object for this mode. When the player finds and catches it, the progress will be saved.

Battle / Stunt / Frontend / Sprint: These special type of tracks can be created with the help of a new GAMETYPE entry in the track .inf file. General syntax:

GAMETYPE    1  ; Track type (0:default, 1:battle, 2:stunt, 3:frontend, 4:sprint)

Add several stars for Battle Tag mode and upto 64 stars for Stunt Arena. The progress is saved for Stunt Arena tracks.

Support for Frontend track type was added in version 19.0120a. See the Frontend Properties section.

Support for Sprint track type was added in version 19.0907a. This requires a valid ENDPOS to be specified.

Reversed Mode: Support for Reversed mode can be added by including a “reversed” folder in your track folder, containing the needed files (see the default levels for example).

The direction of AI Nodes and Pos Nodes can be automatically reversed using special commands in the appropriate edit modes.

File Formats

These options let you select the format to be used when saving files in edit mode, in cases where multiple formats are supported (typically a legacy format for backwards compatibility and newer, modern formats). When not specified, files are saved in the modern format by default.

CAMFORMAT    1  ; Camera nodes format (0:Legacy, 1:Modern)
FLDFORMAT    1  ; Force fields format (0:Legacy, 1:Modern)

Object Thrower

As of version 20.0210a, the Object Thrower trigger supports extended options.

Level Textures

As of version 19.0120a, RVGL supports up to 64 level textures with an extended naming scheme. File names along with their texture ID are listed in the table below.

Intermediate textures should not be skipped. For example, textures K followed by M is an invalid sequence. The first 10 textures (A-J) are, however, always loaded.

ID File name ID File name
0 levela.bmp 32 levelga.bmp
1 levelb.bmp 33 levelha.bmp
2 levelc.bmp 34 levelia.bmp
3 leveld.bmp 35 levelja.bmp
4 levele.bmp 36 levelka.bmp
5 levelf.bmp 37 levella.bmp
6 levelg.bmp 38 levelma.bmp
7 levelh.bmp 39 levelna.bmp
8 leveli.bmp 40 leveloa.bmp
9 levelj.bmp 41 levelpa.bmp
10 levelk.bmp 42 levelqa.bmp
11 levell.bmp 43 levelra.bmp
12 levelm.bmp 44 levelsa.bmp
13 leveln.bmp 45 levelta.bmp
14 levelo.bmp 46 levelua.bmp
15 levelp.bmp 47 levelva.bmp
16 levelq.bmp 48 levelwa.bmp
17 levelr.bmp 49 levelxa.bmp
18 levels.bmp 50 levelya.bmp
19 levelt.bmp 51 levelza.bmp
20 levelu.bmp 52 levelab.bmp
21 levelv.bmp 53 levelbb.bmp
22 levelw.bmp 54 levelcb.bmp
23 levelx.bmp 55 leveldb.bmp
24 levely.bmp 56 leveleb.bmp
25 levelz.bmp 57 levelfb.bmp
26 levelaa.bmp 58 levelgb.bmp
27 levelba.bmp 59 levelhb.bmp
28 levelca.bmp 60 levelib.bmp
29 levelda.bmp 61 leveljb.bmp
30 levelea.bmp 62 levelkb.bmp
31 levelfa.bmp 63 levellb.bmp

Advanced Customization

Support for advanced custom content in user tracks. This includes:

This works by replacing default (stock) data with custom content. When a model, sound, texture, etc. has to be loaded, the file is first searched inside the custom sub-folder located in the current track’s folder.

The only thing to do to add custom content in your track is to create a custom folder inside the track’s directory and place the custom files inside, with the same name as the stock content you want to replace.

Here is the list of the customizable files:

This is an exhaustive list. The support for some formats was added to be able to release a track compatible with legacy Re-Volt versions. This makes it possible to include eg., a simplified .fob file in the main track folder and a custom .fob file placed in the “custom” folder.

In Reverse mode, the custom version of the files in the reversed folder have to be placed inside the custom\reversed folder to be detected.

Reversed Mode Customization

This feature has been introduced in version 18.0720a and subsequently updated in version 18.0731a.

The ability to customize levels for the reversed variant has vastly improved. All supported level files and a few level graphics can now have reversed variants placed in the reversed or custom\reversed folder.

Below is a list of newly supported files that can have reversed variants:

If one of these files is not present in the reversed or custom\reversed folder, the game will fall back to the forward version of the file. Note that fallback support is only provided for newly added formats. There is no fallback functionality for file formats that were already supported. Specifically, a reversed variant must be provided for these formats:

All supported <level>.inf keywords can be customized for reversed mode by placing a reversed\<level>.inf file. When a reversed\<level>.inf file is found, the STARTPOS, STARTROT and STARTGRID keys are taken from that file instead of the REV variants provided in the main <level>.inf file.

Level Properties

This feature has been introduced in version 17.1124a.

Level properties are similar to parameters.txt for cars. They allow you to customize certain aspects of your tracks:

RVGL looks for a properties.txt file when loading a level. If such a file exists, the original materials and effects will be replaced with the ones in the file.

This can be used to tweak existing materials so they fit your track better or even to create entirely new materials like snow.

Sample Properties File

properties_default.txt

This file contains all stock properties. You can use this to base your custom properties on.

Materials

A material structure provides information about the surface cars drive on. Each material has a unique ID. In total, 27 different materials can be used.

Default Materials
ID Material ID Material
0 Default 14 Pebbles
1 Marble 15 Gravel
2 Stone 16 Conveyor 1
3 Wood 17 Conveyor 2
4 Sand 18 Dirt 1
5 Plastic 19 Dirt 2
6 Carpet Tile 20 Dirt 3
7 Carpet Shag 21 Ice 2
8 Boundary 22 Ice 3
9 Glass 23 Wood 2
10 Ice 1 24 Conveyor Market 1
11 Metal 25 Conveyor Market 2
12 Grass 26 Paving
13 Bump Metal

To override a material, add the following to your properties.txt file:

MATERIAL {
  ID               10               ; ID of the material to replace [0 - 26]
  Name             "Ice 1 Snow"     ; Display name

  Spark            true             ; Material emits particles
  Skid             true             ; Skid marks appear on material
  OutOfBounds      false            ; Not implemented
  Corrugated       true             ; Material is bumpy
  Moves            false            ; Moves cars like museum conveyors
  Dusty            true             ; Material emits dust

  Roughness        0.4              ; Roughness of the material
  Grip             0.4              ; Grip of the material
  Hardness         0.2              ; Hardness of the material

  SkidSound        87               ; Sound when skidding [0:Normal, 1:Rough]
  ScrapeSound      1                ; Car body scrape [0:Normal]

  SkidColor        207 215 220      ; Color of the skid marks
  CorrugationType  2                ; Type of bumpiness [0 - 7]
  DustType         2                ; Type of dust
  Velocity         0.0 0.0 0.0      ; Speed and direction cars are moved in
}

In this case, we’re overriding the ICE1 material (ID 10).

If you’re looking for materials to safely override: DIRT1, DIRT2 and DIRT3 share the same values, there is no difference between them at all. CARPETSHAG and CARPETTILE also have the same values.

Material Properties
Property Description Recommended Defaults
ID Unique ID number of the material you want to override. It’s advised to override materials that aren’t used in-game or have the same properties as others (DIRT2, DIRT3, CARPETTILE, PAVEMENT, etc.).
Name Display name, not used by the game. -
Spark The material emits particles that are defined by the assigned dust. true or false.
Skid If true, cars leave skid marks on the ground. true for most materials.
OutOfBounds Not used in the game (yet). false.
Corrugated Makes the surface bumpy. true or false.
Moves Material moves the cars like the museum conveyors. true or false.
Dusty Material generates dust when cars drive on it. true or false.
Roughness Roughness of the material. Between 0.1 and 1.0.
Grip Grip of the material. Between 0.1 and 1.0.
Hardness Hardness of the material. Between 0.1 and 1.0.
SkidSound Sound when cars skid on the material (when the wheels lose traction or drift). 6 (normal) or 7 (rough)
ScrapeSound Sound when cars scrape on the material (when the body touches the ground). 6 (normal) or 7 (rough)
SkidColor Color of the wheel’s skid marks. 50 50 50
CorrugationType ID of the corrugation to use for this material. Corrugated needs to be true. 0
DustType ID of the dust type to use for this material. Dusty needs to be true. 0
Velocity Velocity with which the cars are pushed around with if Moves is true. Multiples of 100.0 should be used.
Sound IDs

Use these IDs for the SkidSound and ScrapeSound properties.

To use more than IDs 6 and 7 for normal and rough skid sounds, stock track sounds can be replaced. For example, rattler.wav from Ghost Town could be replaced with a custom skid sound. To do so, place a file named rattler.wav in your track’s custom folder and use ID 89 in your properties.txt file.

ID Sound path ID Sound path
0 moto.wav 53 hood/birds3.wav
1 petrol.wav 54 hood/dogbark.wav
2 clockwrk.wav 55 hood/kids.wav
3 ufo.wav 56 hood/sprink.wav
4 honkgood.wav 57 hood/tv.wav
5 scrape.wav 58 hood/lawnmower.wav
6 skid_normal.wav 59 hood/digger.wav
7 skid_rough.wav 60 hood/stream.wav
8 pickup.wav 61 hood/cityamb2.wav
9 pickgen.wav 62 hood/roadcone.wav
10 shock.wav 63 garden/tropics2.wav
11 shockfire.wav 64 garden/tropics3.wav
12 electro.wav 65 garden/tropics4.wav
13 electrozap.wav 66 garden/stream.wav
14 firefire.wav 67 garden/animal1.wav
15 firebang.wav 68 garden/animal2.wav
16 balldrop.wav 69 garden/animal3.wav
17 ball.wav 70 garden/animal4.wav
18 hit2.wav 71 muse/museumam.wav
19 wbomb.wav 72 muse/laserhum.wav
20 wbombfire.wav 73 muse/alarm2.wav
21 wbombhit.wav 74 muse/escalate.wav
22 wbombbounce.wav 75 muse/rotating.wav
23 puttbang.wav 76 muse/largdoor.wav
24 fuse.wav 77 market/aircond1.wav
25 oildrop.wav 78 market/cabnhum2.wav
26 countdown.wav 79 market/carpark.wav
27 turbo.wav 80 market/freezer1.wav
28 servo.wav 81 market/iceyarea.wav
29 menunext.wav 82 market/sdrsopen.wav
30 menuprev.wav 83 market/sdrsclos.wav
31 menuupdown.wav 84 market/carton.wav
32 menuleftright.wav 85 ghost/coyote1.wav
33 lightflk.wav 86 ghost/bats.wav
34 boxslide.wav 87 ghost/eagle1.wav
35 starfire.wav 88 ghost/minedrip.wav
36 tvstatic.wav 89 ghost/rattler.wav
37 splash.wav 90 ghost/townbell.wav
38 honka.wav 91 ghost/tumbweed.wav
39 beachball.wav 92 ship/intamb1.wav
40 bottle.wav 93 ship/seagulls.wav
41 toy/piano.wav 94 ship/shiphorn.wav
42 toy/plane.wav 95 ship/strmrain.wav
43 toy/copter.wav 96 ship/thunder1.wav
44 toy/dragon.wav 97 ship/wash.wav
45 toy/creak.wav 98 roof/traffic_mush.wav
46 toy/train.wav 99 roof/helicopter_loop.wav
47 toy/whistle.wav 100 roof/siren_loop.wav
48 toy/arcade.wav 101 roof/wind_loop.wav
49 toy/toybrick.wav 102 roof/steamhiss_loop.wav
50 hood/basketball.wav 103 roof/electric_hum.wav
51 hood/birds1.wav 104 roof/telemetry.wav
52 hood/birds2.wav 105 roof/air_con.wav

Corrugation

Corrugation structures define the bumpiness of the surface. There are 8 types available.

Default Corrugation
ID Corrugation ID Corrugation
0 NONE 4 CONVEYOR
1 PEBBLES 5 DIRT1
2 GRAVEL 6 DIRT2
3 STEEL 7 DIRT3

To override a corrugation, paste the following snipped into your properties.txt:

CORRUGATION {
  ID              1                             ; Corrugation to replace [0-7]
  Name            "Name"                        ; Display name

  Amplitude       0.000000                      ; Amplitude of bumps (strength)
  Wavelength      0.000000 0.000000             ; Frequency of bumps
}
Corrugation Properties
Property Description Recommended Defaults
ID ID of the corrugation type to override. 0 - 7
Name Name of the corrugation. Not used in-game. -
Amplitude Strength of the corrugation (height of the bumps) 0.0 - 5.0
Wavelength Frequency of the bumps 0.0 - 100.0

Dust

Dust structures are a set of two particles with a probability and variance. Materials emit dust when cars drive on them.

Default Dust
ID Dust
0 NONE
1 GRAVEL
2 SAND
3 GRASS
4 DIRT
5 ROAD

To override a dust type, copy the following snippet into your properties.txt:

DUST {
  ID              1                             ; Dust to replace [0 - 5]
  Name            "GRAVEL"                      ; Display name

  SparkType       4                             ; Particle to emit [0 - 30]
  ParticleChance  0.600000                      ; Probability of a particle
  ParticleRandom  0.600000                      ; Probability variance

  SmokeType       29                            ; Smoke particle to emit [0-30]
  SmokeChance     0.300000                      ; Probability of a smoke part.
  SmokeRandom     0.600000                      ; Probability variance
}
Dust Properties
Property Description Recommended Defaults
ID ID of the dust type to override. 0 - 5
Name Display name of the dust type, not used in-game. -
SparkType ID of the particle to emit. 0 - 30
ParticleChance The probability of a particle to be emitted. 0.0 - 1.0
ParticleRandom Variance of the probability. 0.0 - 1.0
SmokeType ID of the smoke particle to emit. 0 - 30
SmokeChance The probability of smoke to be emitted. 0.0 - 1.0
SmokeRandom Variance if the probability. 0.0 - 1.0

Particles

Particles (also called sparks) can be emitted by materials, weapons, cars and other objects.

Default Particles
ID Particle ID Particle
0 SPARK 16 SMALLRED
1 SPARK2 17 EXPLOSION1
2 SNOW 18 EXPLOSION2
3 POPCORN 19 STAR
4 GRAVEL 20 PROBE_SMOKE
5 SAND 21 SPRINKLER
6 GRASS 22 SPRINKLER_BIG
7 ELECTRIC 23 DOLPHIN
8 WATER 24 DOLPHIN_BIG
9 DIRT 25 SPARK3
10 SMOKE1 26 ROADDUST
11 SMOKE2 27 GRASSDUST
12 SMOKE3 28 SOILDUST
13 BLUE 29 GRAVELDUST
14 BIGBLUE 30 SANDDUST
15 SMALLORANGE

To override a particle, copy the following snippet into your properties.txt:

SPARK {
  ID              0                             ; Particle to replace [0 - 30]
  Name            "SPARK"                       ; Display name

  CollideWorld    true                          ; Collision with the world
  CollideObject   true                          ; Collision with objects
  CollideCam      true                          ; Collision with camera
  HasTrail        false                         ; Particle has a trail
  FieldAffect     true                          ; Is affected by force fields
  Spins           false                         ; Particle spins
  Grows           false                         ; Particle grows
  Additive        true                          ; Draw particle additively
  Horizontal      false                         ; Draw particle flat

  Size            1.000000 1.000000             ; Size of the particle
  UV              0.937500 0.000000             ; Top left UV coordinates
  UVSize          0.062500 0.062500             ; Width and height of UV
  TexturePage     47                            ; Texture page
  Color           255 255 255                   ; Color of the particle

  Mass            0.100000                      ; Mass of the particle
  Resistance      0.020000                      ; Air resistance
  Friction        0.100000                      ; Sliding friction
  Restitution     0.500000                      ; Bounciness

  LifeTime        0.500000                      ; Maximum life time
  LifeTimeVar     0.050000                      ; Life time variance

  SpinRate        0.000000                      ; Avg. spin rate (radians/sec)
  SpinRateVar     0.000000                      ; Variation of the spin rate

  SizeVar         0.000000                      ; Size variation
  GrowRate        0.000000                      ; How quickly it grows
  GrowRateVar     0.000000                      ; Grow variation

  TrailType       1                             ; ID of the trail to use
}
Particle Properties
Property Description Recommended Defaults
ID ID of the particle to replace. 0 - 30
Name Display name of the particle, not used in-game. -
CollideWorld The particle collides with the world (geometry from the .w file). true or false
CollideObject The particle collides with objects (cars and other level objects). true or false
CollideCam The particle collides with the camera (currently not implemented). false
HasTrail The particle has a trail. true or false
Field Affect The particle is affected by force fields. true or false
Spins The particle rotates. true or false
Grows The particle grows bigger. true or false
Additive The particle is rendered additively: Black becomes transparent and bright colors are added to the underlying things. true or false
Horizontal Instead of facing the camera, the particle is flat. true or false
Size Size of the particle. 1.0 1.0
UV Top left UV-coordinate of the mapping. 0.0 0.0 is top left and 1.0 1.0 is bottom right. -
UVSize Width and height of the UV mapping (bottom right corner). -
TexturePage Texture the particle will be mapped to. 47-49 are fxpage[1-3], 0-46 are track textures.
Color RGB Color of the particle. 255 255 255
Mass Mass of the particle.
Resistance Air resistance of the particle (how slowly it travels through the ari).
Friction Friction when touching collideable objects.
Restitution Bounciness of the particle.
LifeTime How long the particle lives. If this is too high, the creation of other particles might be prevented.
LifeTimeVar Variance of the life time.
SpinRate The spin rate in radians per second.
SpinRateVar Variation of the spin rate.
SizeVar Initial size variation.
GrowRate How quickly the particle grows.
GrowRateVar Variation of the grow rate.
TrailType ID of the trail if enabled. 0 - 2

Trails

Trails are similar to particles. They follow particles. They’re used for fireworks and some sparks.

Default Trails
ID Trail
0 FIREWORK
1 SPARK
2 SMOKE

To override a spark type, copy the following snippet into your properties.txt:

TRAIL {
  ID              1                             ; Trail to replace [0 - 2]
  Name            "SPARK"                       ; Display name

  Fades           true                          ; Trail fades out
  Shrinks         true                          ; Trail shrinks
  Expands         false                         ; Trail expands
  UV              0.960938 0.000000             ; UV coord for trail segments
  UVEnd           0.960938 0.000000             ; UV coord for last segment
  UVSize          0.007812 0.062500             ; Width and height of both UV
  Color           255 255 255 255               ; Alpha, Red, Green, Blue
  LifeTime        0.030000                      ; Maximum life time
  Width           1.000000                      ; Width of segments
  Length          2                             ; Number of segments
}
Trail Properties
Property Description Recommended Defaults
ID ID of the trail to override. 0 - 2
Name Display name of the trail, not used in-game. -
Fades The trail fades out. true or false
Shrinks The trail segments get smaller. true or false
Expands The trail segments get bigger. true or false
UV Top left UV-coordinate of the mapping of the first trail segments. 0.0 0.0 is top left and 1.0 1.0 is bottom right. -
UVEnd Top left UV-coordinate of the mapping of the last trail segment. 0.0 0.0 is top left and 1.0 1.0 is bottom right.
UVSize Width and height of the UV mapping (bottom right corner). -
Color Alpha, Red, Green, Blue color of the trail. 255 255 255 255
LifeTime How long the trail segments live.
Width Width of the trail segments.
Length Number of trail segments. 1 - 12

Gravity

This section allows you to modify the behavior of the global gravitational field for your track. To customize the level’s gravity, copy the following snippet into your properties.txt:

As of version 19.1230a, the ROCK and ROCKTYPE level *.inf keys are deprecated. New tracks should set these properties in the properties.txt GRAVITY section instead.

GRAVITY {
  Magnitude       2200.0                        ; Magnitude of gravity
  Direction       0.000000 1.000000 0.000000    ; Direction of gravity
  Dampening       0.000000                      ; Dampening effect
  Rockiness       0.000000 0.000000             ; Rocky effect parameters
                  0.000000 0.000000
  RockyType       0                             ; Type of rocky effect [0 - 1]
}
Gravity Properties
Property Description Recommended Defaults
Magnitude Strength of the gravity field. 250.0 - 5000.0
Direction Direction of action of the gravity field. 0.0 1.0 0.0
Dampening Dampening effect of gravity. 0.0 - 100.0
Rockiness Parameters for the rocky ship effect: four values for the X and Z magnitude and X and Z time scale. If magnitudes are non-zero, time must be non-zero.
RockyType Type of rocky effect: 0 for ship, 1 for water surface. 0 - 1

Pickups

This section allows you to modify the behavior of pickups in the level, including spawn count. To customize pickups, copy the following snippet into your properties.txt:

PICKUPS {
  SpawnCount      5 2                           ; Initial and per-player count
  EnvColor        255 255 128                   ; Color of shininess (RGB)
  LightColor      128 96 0                      ; Color of light (RGB)
}
Pickup Properties
Property Description Recommended Defaults
SpawnCount Number of pickups to spawn: two values for the initial count and per-player count. 5 2
EnvColor Color of shininess effect on the pickup. 255 255 128
LightColor Color of the light under the pickup. 128 96 0

Frontend Properties

This feature has been introduced in version 19.0120a.

Frontend properties are similar to properties.txt. They allow you to customize certain aspects of your custom frontend, i.e., Camera Positions.

RVGL looks for a frontend.txt file when loading a frontend. If such a file exists, the original frontend properties will be replaced with the ones in the file.

Sample Frontend File

frontend_default.txt

This file contains all stock frontend properties. You can use this to base your custom properties on.

Camera Positions

Provides information about the camera position and direction at each menu screen. In total, 24 camera views are available.

Default Camera Positions
ID Camera ID Camera
0 INIT 12 NAME_SELECT
1 START 13 DINKYDERBY
2 CAR_SELECT 14 RACE
3 CAR_SELECTED 15 BESTTIMES
4 TRACK_SELECT 16 INTO_TRACKSCREEN
5 MULTI 17 SUMMARY
6 TROPHY1 18 PODIUMSTART
7 TROPHY2 19 PODIUM
8 TROPHY3 20 PODIUMVIEW1
9 TROPHY4 21 PODIUMVIEW2
10 TROPYALL 22 PODIUMVIEW3
11 OVERVIEW 23 PODIUMLOSE

To override a camera, add the following to your frontend.txt file:

CAMPOS {
  ID     0                                      ; Camera to replace [0 - 23]
  Name   "INIT"                                 ; Display name

  Eye    76.500000 -79.300000 -4462.600000      ; Camera position
  Focus  109.500000 -155.300000 -3466.100000    ; Camera focus
}

In this case, we’re overriding the INIT camera (ID 0).

Frontend Camera Properties
Property Description
ID Unique ID number of the camera you want to override.
Name Display name, not used by the game.
Eye Position of the camera.
Focus Look direction of the camera.

Object Animations

This feature has been introduced in version 19.1230a.

Custom object animations allow track makers to script their own animated objects. Animations are defined in a text file named custom_animations.txt placed in the level folder.

Each custom animation object added in Objects edit mode accepts the following flags:

Triggers let you decide when to start the animation. The Custom Animation trigger type supports the following options:

Sample Custom Animations File

custom_animations.txt

This file contains a couple of sample animations along with documentation of all used properties and limitations. You can use this to base your custom animations on.

To see the sample animations in action, download the complete sample track below. cstm_anim_ex.zip

Models

Up to 64 custom models can be defined. These models need to be shared by all animations. Each model has an ID and model name.

MODEL   0   "tw_plane"

In this case, the game looks for the files models\tw_plane.m and models\tw_plane.ncp. However, it is possible to override this behavior by placing the files inside the level’s custom folder instead.

Animations

Up to 256 animations can be defined. To define an animation, add and extend the following block to your custom_animations.txt file:

ANIMATION {
  Slot                      0                         ; Slot ID (0 to 255)
  Name                      "DEFAULT"                 ; Display name (currently unused)
  Mode                      0                         ; 0: loop / 1: animate a single time, stopping after the last frame / 2: back and forth (reverse after last keyframe)
  NeedsTrigger              false                     ; Whether the animation needs to be triggered

  BONE {
    BoneID                  0                         ; Body part ID (0 to 15); part 0 is the main body part
    ModelID                 -1                        ; Model ID (0 to 63, or -1)
    Parent                  0                         ; Body part parent ID; must be smaller than the bone ID; not present at the main body part
    OffsetTranslation       0.000 0.000 0.000         ; Offset to parent location
    OffsetRotationAxis      0.000 -1.000 0.000        ; Offset rotation axis
    OffsetRotationAmount    0.000                     ; Offset rotation (in degrees)
  }

  ; Add more bones here.

  KEYFRAME {
    FrameNr                 0                         ; Number of the keyframe (0 to 255)
    Time                    1.000                     ; Time (in seconds) since previous keyframe
    Type                    0                         ; Interpolation type. 0 - linear, 1 - smooth start, 2 - smooth end, 3 - both smooth, 4 - overshoot
    BONE {
      BoneID                0                         ; Body part ID
      Visible               true                      ; Toggle body part visibility (for all future keyframes until it is changed again)
      Translation           0.000 0.000 0.000         ; Translation
      RotationAxis          0.000 -1.000 0.000        ; Rotation axis
      RotationAmount        0.000                     ; Rotation (in degrees)
    }
    ; Add more bones here.
  }

  ; Add more keyframes here.
}

Up to 16 bones (a main body part and up to 15 child bones) and 256 keyframes can be defined for each animation. The game then interpolates the animation between those keyframes. The type of interpolation can be one of the following:

  1. Linear: Constant velocity and angular velocity.
  2. Smooth start, sudden end: Like an object starting to fall, then hitting the ground.
  3. Sudden start, smooth end.
  4. Smooth start and smooth end.
  5. Exaggerating or overshooting: First moving a bit in the opposite direction, then over the target amount, then again backwards. Gives a robotic look.
Animation Properties
Property Description
Slot Unique ID number of the animation.
Name Display name, not used by the game.
Mode 0: loop / 1: animate a single time, stopping after the last frame / 2: back and forth (reverse after last keyframe).
NeedsTrigger Whether the animation needs to be triggered.
BONE One or more of these blocks to define each body part.
KEYFRAME One or more of these blocks to define each keyframe.
Bone Properties
Property Description
BoneID Body part ID; part 0 is the main body part.
ModelID Model ID for this body part; can be -1.
Parent Body part parent ID; must be smaller than the bone ID; not present at the main body part.
OffsetTranslation Offset to parent location.
OffsetRotationAxis Offset rotation axis; must be a valid non-zero axis.
OffsetRotationAmount Offset rotation (in degrees).
Keyframe Properties
Property Description
FrameNr Number of the keyframe.
Time Time (in seconds) since previous keyframe; animation must have at least one keyframe with non-zero time.
Type Interpolation type. 0 - linear, 1 - smooth start, 2 - smooth end, 3 - both smooth, 4 - overshoot.
BONE One or more of these blocks for each body part that should be moved this keyframe.
Keyframe Bone Properties
Property Description
BoneID Body part ID.
Visible Toggle body part visibility for this keyframe and all future keyframes until this is changed again.
Translation Translation.
RotationAxis Rotation axis; must be a valid non-zero axis.
RotationAmount Rotation (in degrees).

Limitations

World Polys: Each world mesh supports up to 65535 polys. Large worlds should be chopped into several meshes or “cubes” to avoid hitting this limit.

Collision Polys: The maximum polys supported by the world *.ncp file is limited to 65535. However, it is possible to add any number of additional instance *.ncp files, i.e., the total number of world + instance collpolys can exceed 65535.

Camera Nodes: RVGL gives you the option to save the *.cam file in either the old format or the new format with support for coordinate ranges beyond (-32768, 32768).

Force Fields: RVGL gives you the option to save the *.fld file in either the old format or the new format with extended set of options.

File Limits: Following are the limiting values for various level files:


Copyright © RV Team 2010-2020.
Webpage: https://rvgl.re-volt.io
Email: mailto:rv12@revoltzone.net