Chapter 2. Getting Started

Table of Contents
Downloading and installing the Mote source
Reporting bugs and further information
Joining The Project

Mote is available as source code and support files alone at the time of writing. Binary versions will not become available until the project has stabilised and has a releasable product. Therefore this section concentrates on merely getting existing code running rather than introducing technical internal information:

Though mote may compile on other UNIX-like systems with appropriate hardware and software support, the systems used for most development work are running Debian GNU/Linux 2.2- if you are having problems try and "sanity test" on a release of this system.

Downloading and installing the Mote source

Since Mote has been initially developed on the Linux operating system running on Intel (or compatible) hardware there are some pre-requisites for this process:

Note that for the build process itself to succeed there are many more pre-requisites that must be fulfilled. See Installing Source Dependencies for more details

Mote is hosted by SourceForge and therefore the source may be retrieved via anonymous CVS by executing certain commands in a shell session. Since the checkout is anonymous, enter a blank password when prompted.

cvs -d:pserver:anonymous@cvs.mote.sourceforge.net:/cvsroot/mote login
cvs -z3 -d:pserver:anonymous@cvs.mote.sourceforge.net:/cvsroot/mote co Mote
cvs -d:pserver:anonymous@cvs.mote.sourceforge.net:/cvsroot/mote logout
An example session is as follows:
host $  cvs -d:pserver:anonymous@cvs.mote.sourceforge.net:/cvsroot/mote login
(Logging in to anonymous@cvs.mote.sourceforge.net)
CVS password: Enter
host $ cvs -z3 -d:pserver:anonymous@cvs.mote.sourceforge.net:/cvsroot/mote co Mote
cvs server: Updating Mote
cvs server: Updating Mote/MotePerl
cvs server: Updating Mote/images
cvs server: Updating Mote/m-lib
U Mote/m-lib/boot-mote.scm
   ...much output...
cvs server: Updating Mote/tools
host $ cvs -d:pserver:anonymous@cvs.mote.sourceforge.net:/cvsroot/mote logout
(Logging out of anonymous@cvs.mote.sourceforge.net)     
host $ 

Alternatively you may retrieve the nightly tarball from Sourceforge This is not really adequate for those intending to do serious development, however.

Installing source dependencies

Mote is a complex graphical application and requires many third party libaries which, whilst common are not maintained by the Mote developers. Therefore any problems with these libraries should be directed to their respective maintainers. See Bugs and further information.

Table 2-1 below indicates the third party code that Mote depends on, what services each provides and the current Debian package name. If Mote is being installed on a Debian system, merely using apt to install these packages and their dependencies should be sufficient. If Debian is not the system in use, ensure the libaries are installed with full development headers.

Note to reviewers: This probably needs to be done as a proper dependency chart but I'm not sure what the best format would be.

Table 2-1. Mote's Dependencies

LibraryDebian PackageProvidesType
GTK-GLareagtkglarea1.0.6-4-dev.debInclude header files, shared & static libraries etc for gtkglareaDevelopment SDK and shared libraries
Plib 1.2.0-1plib1.2.0-1-dev.debSimple game-orientated API for joysticks, sound and the like. NOTE: currently the Debian file is unstable.Static library and development SDK
LibPNG 1.0.5-1libpng1.0.5-1-dev.debLibrary for manipulating Portable Network Graphics files. Development SDK and shared libraries
Libc6 2.1.3-10libc6-2.1.3-10-dev.debMinimum C library supporting mote's code, including the libpthread threading library.Shared library and development SDK
Libstdc++ 2.91 libstdc++2.9-dev.debMinimum C++ library supporting mote's code.Shared library and development SDK
Mesa G3 3.1-17mesag3.1-17-dev.debAn unlicensed OpenGL implementation with support for 3D acceleration hardware.Shared library and development SDK
GLUT G3 3.7-5glutg3_3.7-50-dev.debAn open GL utility toolkit providing simple windowing functions.Shared libary and development SDK
XLib 6 3.3.6-6 xlib6g3.3.3-6-dev.debX Window System library.Shared libary and development SDK
Guile Scheme 1.3 and libguile4guile1.3.4-2.deb and libguile4_1.3-12-dev.debInterpreter and libraries for Scheme extension system.Shared library, interpreter and SDK
Perl 5.005 perl-5.005.03-7.1.debInterpreter and headers for perl language. This will replace Scheme in the near future.Interpreter and SDK

Versions of the MESA library (such as mesag3-glide) provide support for 3D accelerator hardware, something which Mote takes full advantage of. Mote will run without such hardware using vanilla MESA, albeit slowly, therefore a chapter is in preparation describing the various means of accelerating 3D performance under X including:

  • Glide. Used via MESA to accelerate 3Dfx cards and friends.

  • Glide enabled X Server. New from 3Dfx, this allows Mote to run windowed once more. However, it is very beta! This server uses the DRI layer to interface with your 3dfx card. More information may be found at the 3Dfx website

  • UTAH GLX. Rather unstable, but users have reported astonishing framerates with the Matrox G400 card.

In addition to the items above Mote requires a modern C++ compiler that handles templates correctly (egcs 2.95 is recommended) and the Autoconf utility (available from the Free Software Foundation or your Linux vendor) to generate the correct Makefile. Your make program should be compatible with GNU Make 3.7.

Configuration and compilation

In addition to the Mote executable itself, several other items are found or built in directories below the initial checkout directory.

MotePerl/

Contains the perl extension language bindings and top level objects used when writing extensions.

images/

Contains some in game images, including the control panel and textures.

m-lib/

Contains the scheme definitions of various game objects. Shortly to be replaced by items in the MotePerl/ directory.

tools/

Contains shiptool and ship-conv.pl. The former is a viewer that may examine any of the Scheme-defined ships or other game objects whilst the latter converts LightWave object *.lwo files into in-game objects. See the Tools documentation for more information.

Further documentation will be added (in the form of manual page styles) as these tools and files become more mature.

Note To Reviewers: These entities actually exist but render strangely when using the jadetex system so I didn't put them in. It should be possible to generate nroff code suitable for man pages from these (FreeBSD work in this way) but it would be helpful to include them in the main document as well. The HTML version of the Mote Technical Reference now contains them.

First of all ensure that the dependencies above are met as best you can and the Mote sources have been checked out into an empty directory. In a shell, change to that directory and perform the following commands (some sample output shown):

host $./configure
creating cache ./config.cache
checking for c++... c++
checking whether the C++ compiler (c++ -O3 -Wall -DNDEBUG ) works... yes
   ...much output...
checking for getcwd... yes
checking for regcomp... yes
updating cache ./config.cache
creating ./config.status
creating MotePerl/Makefile
creating tools/Makefile
creating Makefile
host $make
c++ -O3 -Wall -DNDEBUG  -I/usr/X11R6/include -I/usr/include
-Dbool=char -DHAS_BOOL -D_REENTRANT -DDEBIAN -I/usr/local/include 
-I/usr/lib/perl5/5.005/i386-linux
   ...much output...
Manifying blib/man3/Mote::Glue.3pm
make[2]: Leaving directory `/home/david/mymote/Mote/MotePerl'
make[1]: Leaving directory `/home/david/mymote/Mote/MotePerl'
host $

All being well you should be left with a Mote executable and associated tools and you should proceed to Running and testing the game to test the executable. Should the build have failed, examine the following checklist to determine the source of your problems:

The configure script cannot find a library or program and fails.

Check that your system meets all the dependencies in Table 2-1. Also, if your libaries are installed in an unusual place, ensure the environment variable CPLUS_INCLUDE_PATH contains these paths. In the case of the programs, ensure your PATH contains them.

When building the Perl extension interfaces, the build complains that HAS_UNION_SEMUN is undefined.

There are two ways to obtain this union, one method is to include the sys/sem.h file, another is to define it in the Perl headers yourself as follows:

  1. Become superuser and change to the location of your Perl headers (on this system they are in /usr/lib/perl5/5.005/i386-linux/CORE/ [1]).

  2. Edit the file config.h and comment out the line #define HAS_UNION_SEMUN (line 1710) and save. This tells Perl to use its own internal definition of this union.

  3. Recompile and all should now be well.

  4. Alternatively, upgrading your Perl to the latest version available may solve the problem. This route is unsupported however.

Running and testing the game

As Mote is a graphical application, all testing work should be performed whilst X is running [2] Mote should not be run directly at the current time, as some setup is required on the user's part to ensure the extension languages correctly start and generate the universe. To keep this process pain free, the script testmote.sh has been provided. From the mote working directory, simply type:

./testmote.sh
This will set up a few environment variables, start Mote itself and provide a test script to load the universe. You will see some console output (these are the co-ordinates of the vertices composing objects in MoteSpace) before the Mote window itself appears. You will be looking at something approximating DIAGRAM. Should Mote segfault, or fail in some way, please proceed to Bugs and further information to find assistance in solving your problems.

Controlling Your Ship

Piloting such a complex peice of technology as Mote spacecraft can be confusing. Currently, the pilot has two main means of controlling the vehicle:

  1. Keyboard only. This is the default means of control but is sadly limited.

  2. Keyboard and joystick. This requires the (linux) kernel to provide joystick functionality as well as the ownership of compatible joystick hardware. Behaviour under win32 is undefined. That said, joystick control provides a more fluid means and intuitive means of control than the keyboard.

Further means of ship control will be added to Mote shortly courtesy of plib. This will also allow proper joystick support under operating systems other than Linux.

Additionally, the game has several screens providing different functionality. For example the game starts displaying the Status screen which indicates your combat rating, name, rank and other information. From this screen you may currently switch to flight screens allowing you to pilot your craft and the galaxy map screen which displays a starmaps and allows you to plot your course.

Keyboard Controls

The following kepresses are currently implemented for the system (from keys.h:

Left Cursor

Roll the ship to the left in the flight screens. On the galaxy map this scrolls the map to the left.

Right Cursor

Roll the ship to the right. On the galaxy map screen this scrolls the map to the right

Up Cursor

Pitches the ship's nose upwards. On the map screens this scrolls the map up.

Down Cursor

Pitches the ship's nose downwards. On the map screen this scrolls the map down.

A

Accelerates the craft. Note: You can have essentially infinite speed in this version of Mote

Z

Deccelerates the craft. This will reduce the speed to zero but cannot be used as a reverse function.

E

Toggle engines. When the engines are off you will be able to manouvre far more effectively but will be much slower (as you are only using the thrusters rather than the main drive).

H

This key works on the galaxy map only. It will switch your view back to the part of the map where your ship is currently located.

J

On any flight view this will engage your Jump engines (if your ship has them fitted). Currently this makes you go very fast, very quickly. Engaging them whilst tailgating the local crime lord's mega-yacht has been the downfall of many a space-farer.

F1

Switch to the Front flight screen or re-launch your ship if docked.

F2

Switch to the Rear flight view.

F3

Switch to the Left waist view. Note that this is deprecated and may result in the default switch to the Front view (though the view title will say "Left View").

F4

Switch to the Right waist view. Like the Left view this is deprecated.

F5

Switch to the external view. This allows you to admire the textures that now adorn Mote ships.

F6

Switch to the Galaxy Map view

F10

Switch to the status view.

Please note that the controls do not degrade; if you are using the rear view and press A your view will appear to be going "backwards"!

Joystick and Keyboard Controls

The keyboard component of this control method remains the same but now the following joystick actions can be used to control your vessel:

Left/Right Axis

Roll your ship, or scroll the galaxy map.

Up/Down axis

Pitch your ship or scroll the galaxy map.

3rd Axis

Some joysticks may have a 3rd control built into the stick (try twisting it) or attached to the base unit. If present this will allow you to control your throttle.

1st Button

Switch to Front View.

2nd Button

Switch to Rear view.

3rd Button

Switch to Left view. Deprecated.

4th Button

Switch to Right view. Deprecated.

Notes

[1]

You can extract this location by running grep perl5 Makefile in the Mote source directory. The path ending with "CORE" is what you require.

[2]

This is slightly different when Glide is in use, however this document does not yet cover the use of Glide with Mote.