Build
Tested & Working Environments
Microsoft Visual C++ 2005 (Express Edition). Fully supported and includes project
and workspace files. NOTE: In Windows VisualC, be sure to set
the build to Debug or Release. You should start with debug.
MacOSX (Intel) XCode 2.4. Fully supported and includes XCode project files. Note that Lilith3D does not work on PPC systems. (Although a patch, if you get it working on PPC, would be very much appreciated.)
MAC OSX NOTE: For some reason, the XCode "working directory" does not carry forward with the project file. You need to:
- open lilith project -> executables -> lilith
- "Set the working directory" -> Project Directory
If any one knows how to fix this, please post to the Lilith forum!
Not Working
But should work with minor effort.Please submit a patch if you get these systems building.
Linux gcc, Windows Dev-C++.
Required Libraries
Lilith requires the following
(very useful!) libraries.
Development Binaries
(or built source):
- SDL,
cross platform graphics and OpenGL support. You will need development
binaries or have compiled SDL from source.
Runtime .dll/.so only:
- SDL_Image,
for loading image files. You only need the runtime binaries, NOT
the development binaries.
And, of course, OpenGL (and GLU, which normally comes with the OpenGL libraries.)
But that is generally pre-installed on any modern OS. Of course,
getting the latest video drives is a good way to increase performance
and reduce bugs. A recent version (1.5?) or better, with shader support, is required.
Organization
lilith - contains the
engine and demo source code
graphics - all the
source graphics used by the engine
grdemo - the source graphics for the demo and tutorial files
docs - API documentation
tutorial - source
code for all the tutorials
grinliz - utility classes
tinyxml - xml parser
micropather - A* solver
for pathing
Windows
Windows VisualC Setup
If you are using SDL,
you've probably done this - take a quick read through to be sure.
The Windows version .sln
(and .vcproj) files are for building under Microsoft's Visual C++ version
2005 or higher.
The Lilith3D project
needs (like any SDL client) the following connections to SDL:
- At compile time,
the compiler needs to be able to find the SDL headers.
- At link time, the
linker needs to be able to find your sdl.lib, sdlmain.lib, and
sdl_image.lib files.
- At run time, the
executable needs to find your sdl.dll (and for other projects,
sdl_image.dll) file.
To accomplish this this
is Visual Studio, go to Tools::Options::Directories. Under the "Show
Directories For" tab, choose "Include files". In
the path list box, add the path to your SDL include files (/SDL/include
depending on where you installed it.) The compiler can now locate
the SDL headers. Make sure both the SDL and SDL_image headers are
at the same location, or add another path for SDL_image.
Switch "Show directories
for" to library files, and add a path to where your sdl.lib,
sdl_image.lib, and sdlmain.lib files are. The linker will now be
able to find the library files.
For run time, sdl.dll
and sdl_image.dll will need to be available. Windows will search
directories in the following order for these dll's:
- The directory from
which the application loaded.
- The current directory.
- The Windows system
directory.
- The directories that
are listed in the PATH environment variable.
Once you've gone through
these steps, they are applied to all your projects and you shouldn't
have to go through them again.
Windows Build Process
From the Visual Studio
IDE, open 'lilith.sln' in the lilith directory.
There are several targets.
From Built->Set Active Configuration, choose "Debug"
or "Release". The other targets are for specialized debugging.
The following projects
(or all of them) can be built:
- lilith - builds the
demo program.
- liilthLib - builds
the lilith library (.lib) file that is used by all the other projects
Preprocessor Defines
In Project Settings->C/C++-->Preprocessor
Definitions, there is one option that control Lilith:
- L3PERF. Turns on performance
timing measurement of critical functions.
Mac OSX
Lilith3D includes XCode project files. It expects the SDL and SDL_image frameworks to be installed.
The XCode project includes the test application - "creation.cpp" and "creation.h" - which are actually not part of the Lilith3D library. Seperating the project into proper libary / application parts is future work.
Linux [Not currently supported]
Linux is an easier build
process than Windows, fortunately. First, verify that you have SDL
and SDL_image correctly installed. From the command line, 'sdl-config
--version' should return version 1.2 or higher.
From lilith directory,
'make'. This will build the library (liblilith.a) and the demo (lilith).
To build the tutorials, switch to the 'tutorial' directory and 'make'
again.
You can choose options
- debugging, release, profiling - by editing flags commented at
the beginning of the Makefile.
The Makefile has no dependencies
on headers. If you change a header, "make clean" and then
"make".
Running the demo
The demo (creation.cpp)
is a demo that's very useful to see (and play with)
the features of the engine. Another option is to check
out the tutorial which walks through the features step by step.
Arguments when running
the demo:
- file.xml runs the
specified script file
- -f runs fullscreen
- -e turns on the performance meter
- -m# runs multisampling at # samples per pixel
Scripted sequence
Linux/Mac: ./lilith script0.xml
-f
Windows: In Project
Settings::Debug::Program Arguments, enter script0.xml -f
Running interactive
Linux: ./lilith
Windows: lilith (no
arguments)
Commands in interactive
mode:
- Arrow keys move
camera.
- Control key + arrow
keys change
pitch.
- Alt key + arrows
rolls camera.
- Change mouse button
actions: space bar
- Movement: left
button moves test mob, right button places
- Terrain: left
button raises volcano, right button creates pit
- Bridge: left
button anchors bridge, right button creates end
- Build: left
button places builiding, right removes
| Rendering
Modes |
| F1 |
Shader rendering. |
| F2 |
|
| F3 |
Pather Render
Mode |
| F4 |
Level of Detail
Render Mode |
| F5 |
Toggle Sun |
| |
|
| Toggles |
| F6 |
|
| F7 |
Butt-Cam (if walking
mob created) |
| F8 |
Real time profiler
(if enabled with L3PERF) |
| |
|
| Weather |
| Keypad 7, 8, 9 |
Rain Control |
| Keypad 4, 5, 6 |
Fog Control |
| |
|
| Misc |
| Home |
Home the camera |
| SpaceBar |
Swich between
action modes (Mob, Terrain, Bridge, Build) |
| Tab |
Capture the screen
and save to file |
|