7.6.1 Components of a World
This section describes the objects used to build a world. This is useful to
understand the format of the Crystal Space map file
(see section 7.7.1 Format of Map File). To understand this you should know the basics of
the 7.6.2 Portal Engine. This section describes the compenents of the world
independent from the file format, so it is also useful if you want to build a
world from within your program.
Some objects appear in the map file but are not described here, like the
skydome. Rather than being core components of the world as described
here, such objects are shortcuts for creating complex structures out of the
core components.
The world is built up from the following objects:
-
Sectors. For details, see the portal engine discussion
(see section 7.6.2 Portal Engine). Basically sectors define a region of space
that can contain several geometrical objects. As opposed to earlier
versions of Crystal Space a sector does not itself represent geometry.
Instead all geometry in a sector is made from Mesh Objects.
-
Mesh Objects. See the mesh object section for more specific information
about them (see section 7.8 Mesh Object Plug-In System). Mesh objects represent geometry in some
sector. Everything you can see (walls, actors, particle systems, ...) is
represented by some kind of mesh object.
-
Mesh Object Factories. Mesh object factories are objects that
can be used to create mesh objects that inherit characteristics
from their mesh factory. Basically a mesh object factory is like
a blue-print for creating a mesh object.
-
Portals. Again see the portal discussion (see section 7.6.2 Portal Engine) but
the idea is that sectors are normally totally independent regions of
space unless you connect them through portals. Portals are implemented
inside the Thing Mesh Object. There you can assign a portal to some
sector to a single polygon.
-
Light Sources. There are different ways how light is applied to objects
to increase performance. See section 7.6.3 Lighting.
-
Collection Objects. These are simply groups of other objects.
-
Key/value Pairs. A key/value pair is a
{key,value} tuple describing some game specific concept.
Key/value tuples are represented by a pair of strings. If you have
built levels for Quake before, you are probably familiar with this concept
from Quake's Entities. Almost all objects in the Crystal Space
engine support these key/value pairs so you can attach this kind of
information to anything. Crystal Space itself will not use this information
but your game can query it and perform the appropriate actions.
In theory it is up to your program as to how these key-value tuples
are interpreted. However, Crystal Space has set some standards to make life
easier for level designers and also to make levels as portable as possible
between different Crystal Space games. See section Keylist Standards.
-
Nodes. A node represents a point in space.
The Thing Mesh Object is probably the most important mesh object
as it can be used to define how the basic structure of your world looks
like. Here is a list of concepts that are related to Things:
-
Polygons and curves. Things are made from polygons and/or
curves. To define such an object you enumerate all polygons and curves
that make up the geometry of such thing.
-
Portals. As mention above portals are a special case of
polygons that point to some other sector (or sometimes the same
sector in case of a mirror).
-
Texture Planes. Polygons in a thing are texture mapped
using a transformation from object to texture space. A texture
plane describes this transformation. Several polygons can share
the same texture plane which means that they will be texture mapped
the same way. If you place two polygons with the same texture
plane next to each other the texture will appear to continue
without interruption from one polygon to the other.
Keylist Standards
This section describes some guidelines for key/value tuples.
The most important key is the `classname' key. It tells the program the
type of an object. All the following guidelines are set for special object
classes. If you don't agree with them, you should use different classnames.
The following classnames are standardized:
@@@FIXME: Write this.
This document was generated
using texi2html