Thomas Buck 9fff7d88ee Removed unit tests | hace 10 años | |
---|---|---|
cmake | hace 10 años | |
data | hace 10 años | |
include | hace 10 años | |
src | hace 10 años | |
.gitignore | hace 10 años | |
CMakeLists.txt | hace 10 años | |
COPYING | hace 11 años | |
ChangeLog | hace 10 años | |
README.md | hace 10 años |
OpenRaider is an Open Source implementation of the classic Tomb Raider Game Engine. It was abandoned in 2003.
This project aims to get OpenRaider in a more usable state, maybe one day even being able to play the old Tomb Raider games flawlessly…
If you just want to see OpenRaider doing something on your Mac, without installing any of the dependencies needed to build OpenRaider, grab the Mac App Bundle from the most recent release.
It seems as if OpenRaider will currently only work on Little-Endian platforms. This is not nice and will hopefully be fixed in the future!
OpenRaider needs some configuration files, and level data and assets from custom levels or the Tomb Raider games.
These are stored in ~/.OpenRaider
. Running make setup
will create/copy the necessary files and directories.
You still need to add level files in ~/.OpenRaider/paks/
and add them to ~/.OpenRaider/OpenRaider.init
.
Dust off your old Tomb Raider CDs or grab some custom levels from the interwebs.
All previously included documentation was moved into the OpenRaider Repo Wiki. Also take a look at the BUGS, TODO and Requirements.
A more or less recent Doxygen documentation of OpenRaider should be on the Github Pages for OpenRaider.
Basically, OpenRaider depends on the following:
On Mac OS X 10.9 with XCode and MacPorts installed, the following should be enough to get all dependencies that are available as port:
sudo port install cmake zlib libsdl2 libsdl2_ttf
A similar command for the package manager of your favorite Linux Distribution should do the trick.
cmake is also needed to build freealut, which you’ll need to enable sound output on Mac OS X. Get, compile and install freealut like this:
git clone git@github.com:vancegroup/freealut.git
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX:STRING="/usr/local" -DCMAKE_C_FLAGS:STRING="-O2"
make
sudo make install
Linux Distributions will probably provide an ALUT library ready to install with their package manager, so you won’t need to compile freealut.
Do a standard cmake out-of-source build to get a debug configuration and then run the resulting executable:
mkdir build && cd build
cmake ..
make run
On Mac OS X, running make install
will produce a (more or less) distributable OpenRaider.app bundle.
You can run a static analysis with cppcheck using make check
, make checkFull
or make checkConfig
.
A Doxygen API documentation can be created with make doc
.
make clean
should remove all intermediary files. make run
will run the binary.
OpenRaider will try to load ~/.OpenRaider/OpenRaider.init
or, if it doesn’t exist, OpenRaider.init
from the current directory.
Running make setup
will create a minimal configuration in your home directory.
The configuration file format is very simple:
#
up to the next \n
will be ignored.@
mark a “preprocessor” command. The only one currently implemented is @include
, allowing you to include another file as configuration file.[]
, eg. [Engine.OpenGL.Driver]
set the mode for following commands.You can use paks from any Tomb Raider version supported and most user made paks for Tomb Raider. Only PHD, TR1, TR2, TR3, and TR4 paks are supported as of this writing.
Setting up external sound SFX, for TR2 and TR3 paks only.
TR2 and TR3 paks (both have file extension .tr2
) don’t have sound data contained in the pak itself, but instead
they share a common SFX file (often MAIN.SFX) for each pak from a given Tomb Raider version.
Previously, OpenRaider tried to load an SFX file with the same name as the level file, with .sfx
added to the end.
You had to create a symlink for each level to the SFX file if you were using original Tomb Raider levels, like this:
cd ~/.OpenRaider/paks/tr3/
cp /mnt/cdrom/data/MAIN.SFX .
for i in *.tr2; do ln -s MAIN.SFX $i.sfx; done
Now, OpenRaider just tries to load a MAIN.SFX
in the same folder as the level file.
If you want to change this behaviour, this happens around line 1075 of src/OpenRaider.cpp
.
Key | Action |
---|---|
<Alt><Enter> | Toggle fullscreen |
<Esc> | Interactive Level load menu |
` | Console toggle on/off |
Mouse | Turn |
MouseBtn Left | Shoot |
w | Move forward |
s | Move back |
e | Move down |
q | Move up |
r | Play sound quick test |
/ | Drop a waypoint test (formally undocumented) |
[ ] | Adjust idle animation for testing |
Console commands (BOOL is ‘0’, ‘1’, “true” or “false”). Pressing <UP> will go back to last command entered (saves typing).
Command | Action |
---|---|
quit | Quit the game |
sshot | Take screenshot |
play INT | Play sound fx with number |
loadlevel STRING | Load level with mapname STRING |
sensitivity.x FLOAT | Set mouse sensitivity for X movement |
sensitivity.y FLOAT | Set mouse sensitivity for Y movement |
fullscreen | Toggles fullscreen mode |
walk | Toggle world clipping on |
ghost | Toggle world clipping off |
fly | Toggle world clipping off without gravity |
noclip | Toggle world clipping in cycle |
hop | Toggle room hopping hack |
showfps BOOL | Show FPS |
resize STRING | Change resolution to xga , svga or vga |
Command | Action |
---|---|
texture INT | Display the specified 2D texture for 2s |
wireframe | Render in wireframe (for debugging) |
solid | Render solid color polygons |
texture | Render with textures |
vertexlight | Render with vertexlights |
titlescreen | Render titlescreen |
r_animate BOOL | Animate all models at once |
r_upf BOOL | Update room render list once per frame |
r_ponytail BOOL | Render ponytail on Lara |
r_pigtails BOOL | Render ponytails as pigtails on Lara |
r_ponyangle INT | Set rotation of ponytail on Lara |
r_ponyx INT | Set X offset of ponytail on Lara |
r_ponyy INT | Set Y offset of ponytail on Lara |
r_ponyz INT | Set Z offset of ponytail on Lara |
r_viewmodel INT | Load skeletal model with index INT |
r_fog BOOL | Render fog toggle |
r_portal BOOL | Render portals in rooms |
r_particle BOOL | Render particles |
r_vmodel BOOL | Render view model |
r_sprite BOOL | Render sprites (room fx and items) |
r_roommodel BOOL | Render room models |
r_entmodel BOOL | Render entity models |
r_light BOOL | Render with GL lights |
r_ralpha BOOL | Render alpha pass for rooms |
r_vis BOOL | Render using visibility checking |
r_oneroom | Render only the current room |
r_allrooms | Render all rooms in the level (debug/stress) |
These commands have to be entered as set COMMAND VALUE
or set COMMAND=VALUE
.
Command | Action |
---|---|
mousegrab BOOL | Set mouse grabbing on/off |
These commands have to be entered as stat COMMAND
.
Command | Action |
---|---|
fps | Toggle showing FPS |
pos | Show current location |
room | |
flags | Show room flags in hex |
The included example Font, Droid Sans Mono, was created by Steve Matteson and is licensed under the Apache 2.0 License.
There are some included cmake scripts:
See the respective files in cmake
for their licensing.
OpenRaider is based on code, specs, and alogrithms from:
All code should be GPLed, unless otherwise noted.
2013, 2014 improvements, clean-up by xythobuz.