Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 4212

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created by texi2html 1.76 -->
<!--
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: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>

-->
<head>
<title>Crystal Space 1.2.1: 2.4.5.4 Using Crystal Space</title>

<meta name="description" content="Crystal Space 1.2.1: 2.4.5.4 Using Crystal Space">
<meta name="keywords" content="Crystal Space 1.2.1: 2.4.5.4 Using Crystal Space">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.76">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="MacOS_002fX-Running-Programs"></a>
<a name="0"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="MacOS_002fX-Building.html#0" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="Problems.html#0" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="Building.html#0" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="MacOS_002fX.html#0" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="Running-The-Demos.html#0" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="index.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="cs_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="cs_Index.html#0" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="cs_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<hr size="1">
<h4 class="subsubsection"> 2.4.5.4 Using Crystal Space </h4>

<p>Crystal Space programs can be run directly from the command-line or from the
Finder.  If you plan to launch programs by double-clicking on them in the
Finder, then you must tell them where to find the resources which they require
to run.  This is accomplished by storing the path to the root of the Crystal
Space directory in the MacOS/X <em>defaults</em> database under the name
<samp>&lsquo;CrystalSpaceRoot&rsquo;</samp>.  It is most useful to configure this setting in the
<em>global</em> defaults domain.  Depending upon your needs, you can set this to
point at either the installed Crystal Space <small>SDK</small> or to the development
directory where you built the project; either location works.
</p>
<p>For example, if you have installed Crystal Space at the default location, then
you can tell programs where to find their resources by invoking the following
configuration command from the command-line:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">defaults write NSGlobalDomain CrystalSpaceRoot &quot;/usr/local&quot;
</pre></td></tr></table>
<p>If necessary, it is possible to configure <samp>&lsquo;CrystalSpaceRoot&rsquo;</samp> for a
particular application.  If you do so, this setting will override the global
setting.  For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">defaults write walktest CrystalSpaceRoot &quot;$HOME/CS&quot;
</pre></td></tr></table>
<p>It is also possible to instruct Crystal Space applications to ignore the value
of <samp>&lsquo;CrystalSpaceRoot&rsquo;</samp> by assigning the <samp>&lsquo;CrystalSpaceRootIgnore&rsquo;</samp>
option a value of <samp>&lsquo;Yes&rsquo;</samp>.  This is most useful when you would like to have
a particular application ignore the value of <samp>&lsquo;CrystalSpaceRoot&rsquo;</samp> set in the
global domain.  For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">defaults write walktest CrystalSpaceRootIgnore &quot;Yes&quot;
</pre></td></tr></table>
<p>Before attempting to run any of the Crystal Space sample applications, ensure
that the files <tt>&lsquo;standard.zip&rsquo;</tt> and <tt>&lsquo;stdtex.zip&rsquo;</tt> reside in
<tt>&lsquo;CS/data&rsquo;</tt> or in the <tt>&lsquo;data&rsquo;</tt> directory where Crystal Space is
installed.  These files contain resources and textures which are used by
several of the example programs and map files.
</p>
<p>You need to have one or more <em>map</em> files in order to run WalkTest.  These
are the files which contain the maps and rooms which you can explore with
WalkTest.  The most commonly used example map file is <tt>&lsquo;flarge&rsquo;</tt>.
</p>
<p>You may need adjust the ambient lighting which the engine applies when it
lights the maps.  This may be necessary if you find that the scenes appears too
dark.  You can do this by setting ambient lighting values via the following
configuration commands from the command-line.  The default value for these
settings is 20.  If that is too dark for you, try using a higher value.
For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">defaults write CrystalSpace.Global Engine.Lighting.Ambient.Red 50
defaults write CrystalSpace.Global Engine.Lighting.Ambient.Green 50
defaults write CrystalSpace.Global Engine.Lighting.Ambient.Blue 50
</pre></td></tr></table>
<p>If you want ambient lighting to apply to only a single application, or if you
want to override the global setting with an application-specific setting,
replace <samp>&lsquo;CrystalSpace.Global&rsquo;</samp> in the above commands with
<samp>&lsquo;CrystalSpace.Application&rsquo;</samp> where <samp>&lsquo;Application&rsquo;</samp> is the name of the
application (for example, <samp>&lsquo;CrystalSpace.Walktest&rsquo;</samp>).
</p>
<p><strong>Important</strong>: The first time you explore a map after changing the ambient
white value, you should run WalkTest with the <samp>&lsquo;--relight&rsquo;</samp> option.  This
causes Crystal Space to recalculate the lighting information in the map in
order to take advantage of the new ambient light value.  Note, however, that
relighting a map may be time consuming, particularly for certain sizable maps,
so be patient.
</p>
<p>As a general rule, you may find it useful to specify the <samp>&lsquo;--relight&rsquo;</samp>
option with newly downloaded maps, or at any other time that the lighting in a
map seems somehow to be incorrect.
</p>
<p>To specify options when running programs, you must invoke the programs from the
command-line, however the need to specify command-line options is rare, so this
should not prove much of an inconvenience.
</p>
<p>To run WalkTest with a particular map (for instance, <tt>&lsquo;flarge&rsquo;</tt>) for the
very first time, for example, type:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">./walktest.app/Contents/MacOS/walktest --relight flarge
</pre></td></tr></table>
<p>Subsequent uses of the map file do not require <samp>&lsquo;--relight&rsquo;</samp>, in which case
you can type:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">./walktest.app/Contents/MacOS/walktest flarge
</pre></td></tr></table>
<p>Once invoked, you will be able to explore the map file (<tt>&lsquo;flarge&rsquo;</tt>) by using
the navigation controls (see section <a href="Walktest-Movement.html#0">Movement Commands</a>).  To explore a different
map, substitute its name in place of <samp>&lsquo;flarge&rsquo;</samp>.
</p>
<p>If you would like to explore a map other than <samp>&lsquo;flarge&rsquo;</samp> without having to
type it on the command-line, you can add the following setting to the MacOS/X
defaults database.  This will allow you to explore different maps even when
launching WalkTest from the Finder.  For example, to explore a map named
<samp>&lsquo;castle&rsquo;</samp>, set the following default value:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">defaults write CrystalSpace.Walktest Walktest.Settings.WorldFile castle
</pre></td></tr></table>
<p>Other interesting applications, such as csDemo, also come with
Crystal Space.
</p>
<p>By default, Crystal Space renders the 3D scenes with the OpenGL renderer.  Some
versions of the MacOS/X operating system ship with OpenGL drivers which do not
not perform particularly well with the Crystal Space OpenGL renderer, and this
problem could result in poor frame rates.  Consequently, you may want to
configure Crystal Space to instead use the software renderer.  There are two
ways to enable the software renderer.  First, you may instruct a program to use
software renderer from the command-line:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">./walktest.app/Contents/MacOS/walktest --video=software flarge
</pre></td></tr></table>
<p>Second, you can enable the software renderer on a permanent basis for all
applications by setting the following default.  Once you have applied this
setting, you no longer need to specify <samp>&lsquo;--video=software&rsquo;</samp> on the
command-line.
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">defaults write CrystalSpace.Global System.Plugins.iGraphics3D \
  crystalspace.graphics3d.software
</pre></td></tr></table>
<p>Crystal Space renders 3D scenes in a window by default, however you can
instruct the applications to use <em>full-screen</em> mode with the <samp>&lsquo;--fs&rsquo;</samp>
command-line option.  For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">./walktest.app/Contents/MacOS/walktest --fs flarge
</pre></td></tr></table>
<p>Alternately, if you prefer to launch programs from the Finder, you can install
the following default setting to enable full-screen mode for all Crystal Space
applications:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">defaults write CrystalSpace.Global Video.FullScreen yes
</pre></td></tr></table>
<p>It is also possible to enable full-screen mode selectively only for certain
applications.  For example, to enable full-screen mode only for CsDemo
by default, you could apply this default setting:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">defaults write CrystalSpace.csdemo Video.FullScreen yes
</pre></td></tr></table>
<p>On the MacOS/X, Crystal Space will pause execution when the window is
de-activated, and resume execution when the window is re-activated.  Paused
state is indicated by the text &ldquo;[Paused]&rdquo; in the title of the window.  If you
wish to disable this behavior, and allow programs to run even when the window
is not active, apply this setting to your defaults database:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">defaults write CrystalSpace.Global System.RunWhenNotFocused yes
</pre></td></tr></table>
<p>You can also use the command-line option <samp>&lsquo;--alwaysruns&rsquo;</samp>.
</p>

<hr size="1">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="MacOS_002fX-Building.html#0" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="Problems.html#0" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="Building.html#0" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="MacOS_002fX.html#0" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="Running-The-Demos.html#0" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="index.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="cs_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="cs_Index.html#0" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="cs_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
 </font>
 <br>

</p>
</body>
</html>