1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HTML>
<HEAD>
<TITLE>Crystal Space: World Components</TITLE>
<META NAME="description" CONTENT="Crystal Space: World Components">
<META NAME="keywords" CONTENT="Crystal Space: World Components">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC360"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_168.html#SEC359"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_170.html#SEC362"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_167.html#SEC358"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_168.html#SEC359"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_196.html#SEC414"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<HR SIZE=1>
<H3> 7.6.1 Components of a World </H3>
<!--docid::SEC360::-->
<P>
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 <A HREF="cs_197.html#SEC415">7.7.1 Format of Map File</A>). To understand this you should know the basics of
the <A HREF="cs_170.html#SEC362">7.6.2 Portal Engine</A>. 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.
</P><P>
The world is built up from the following objects:
</P><P>
<UL>
<LI>
<EM>Sectors</EM>. For details, see the portal engine discussion
(see section <A HREF="cs_170.html#SEC362">7.6.2 Portal Engine</A>). 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 <EM>Mesh Objects</EM>.
Theoretically a sector is infinite although in practice it is usually
logically bounded by sector walls or a sky object.
<P>
<LI>
<EM>Mesh Objects</EM>. See the mesh object section for more specific information
about them (see section <A HREF="cs_201.html#SEC452">7.8 Mesh Object Plug-In System</A>). Mesh objects represent geometry in some
sector. Everything you can see (walls, actors, particle systems, ...) is
represented by some kind of mesh object. This is a very important concept
in the Crystal Space engine.
<P>
<LI>
<EM>Mesh Object Factories</EM>. 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.
<P>
<LI>
<EM>Portals</EM>. Again see the portal discussion (see section <A HREF="cs_170.html#SEC362">7.6.2 Portal Engine</A>) but
the idea is that sectors are normally totally independent regions of
space unless you connect them through portals. Portals are implemented
inside the <EM>Thing Mesh Object</EM>. There you can assign a portal to some
sector to a single polygon.
<P>
<LI>
<EM>Light Sources</EM>. There are different ways how light is applied to objects
to increase performance. See section <A HREF="cs_171.html#SEC368">7.6.3 Lighting</A>.
<P>
<LI>
<EM>Collection Objects</EM>. These are simply groups of other objects.
<P>
<LI>
<EM>Key/value Pairs</EM>. A key/value pair is a
{<VAR>key</VAR>,<VAR>value</VAR>} 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 <EM>Entities</EM>. 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 <A HREF="cs_169.html#SEC361">Keylist Standards</A>.
<P>
<LI>
<EM>Nodes</EM>. A node represents a point in space. The engine itself will not
use nodes but a game can use them to represent game specific data.
</UL>
<P>
The <EM>Thing Mesh Object</EM> 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 <EM>Things</EM>:
</P><P>
<UL>
<LI>
<EM>Polygons and curves</EM>. <EM>Things</EM> 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.
<P>
<LI>
<EM>Portals</EM>. 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).
<P>
<LI>
<EM>Texture Planes</EM>. 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.
<P>
</UL>
<P>
<A NAME="Keylist Standards"></A>
<A NAME="SEC361"></A>
<H4> Keylist Standards </H4>
<!--docid::SEC361::-->
<P>
This section describes some guidelines for key/value tuples.
</P><P>
The most important key is the `<SAMP>classname</SAMP>' 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.
</P><P>
The following classnames are standardized:
</P><P>
@@@FIXME: <EM>Write this.</EM>
</P><P>
<A NAME="Portal Engine"></A>
<HR SIZE=1>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_168.html#SEC359"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_170.html#SEC362"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_167.html#SEC358"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_168.html#SEC359"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_196.html#SEC414"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>
|