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!
But should work with minor effort.Please submit a patch if you get these systems building.
Linux gcc, Windows Dev-C++.
Lilith requires the following
(very useful!) libraries.
(or built source):
cross platform graphics and OpenGL support. You will need development
binaries or have compiled SDL from source.
Runtime .dll/.so only:
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.
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
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
- At run time, the
executable needs to find your sdl.dll (and for other projects,
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
- 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
- liilthLib - builds
the lilith library (.lib) file that is used by all the other projects
In Project Settings->C/C++-->Preprocessor
Definitions, there is one option that control Lilith:
- L3PERF. Turns on performance
timing measurement of critical functions.
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'
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
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
- file.xml runs the
specified script file
- -f runs fullscreen
- -e turns on the performance meter
- -m# runs multisampling at # samples per pixel
Linux/Mac: ./lilith script0.xml
Windows: In Project
Settings::Debug::Program Arguments, enter script0.xml -f
Windows: lilith (no
Commands in interactive
- Arrow keys move
- Control key + arrow
- Alt key + arrows
- 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
||Level of Detail
||Butt-Cam (if walking
||Real time profiler
(if enabled with L3PERF)
|Keypad 7, 8, 9
|Keypad 4, 5, 6
||Home the camera
action modes (Mob, Terrain, Bridge, Build)
||Capture the screen
and save to file