Home | A simple start. |
|
Introduction
This article is supposed to be a reference only to document the internal file structure of the engine. Hopefully editors will take care of handling these files.
Scenarios (.scn)
Scenarios are a combination of level loading and gameplay code. The following files are used in the definition of a scenario:
An example .scn file:
;
; Mountain ride scenario
;
level
{
layer0=mygame/levels/mountain_trail/base_track.lyr
;layer1=...
}
gameplay
{
code=mygame/code/games/hotlap.oxs
}
Layer files (.lyr)
Layer files define entity instances of components. An example layer file:
layer
{
; Components with initial values
instance0
{
component0=mygame/graphics/tracks/carrera
}
}
Track components
As described above, the Carrera is loaded as an entity with just a single component. The 'mygame/graphics/tracks/carrera/definition.ini' file (as referenced in the layer file above) for this component looks as follows:
component
{
type=track
track=carrera
}
This really is a component that has a very complex type. The whole track is loaded as one object though. The same exists for cars, where the interface to the car is really quite complex. This is a remnant of the pure Racer days.
(last updated July 3, 2014 )