Thomas Buck 9bec5d5bd9 Rewrote bufferString() | 10 år sedan | |
---|---|---|
cmake | 10 år sedan | |
data | 10 år sedan | |
include | 10 år sedan | |
src | 10 år sedan | |
test | 10 år sedan | |
.gitignore | 10 år sedan | |
CMakeLists.txt | 10 år sedan | |
COPYING | 11 år sedan | |
ChangeLog | 10 år sedan | |
README.md | 10 år sedan |
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 the included setup.sh
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 and then run the resulting executable:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make
./src/OpenRaider
On Mac OS X, running make install
will produce a (more or less) distributable OpenRaider.app bundle.
To build all Unit Tests run make tests
, to build and run most of them use make testRun
.
To run a TombRaider level loader regression test use make testReg
. The results will be put into log files in your build folder.
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
or the cmake/setup.sh
script 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 now ‘0’ or ‘1’ for less typing). Pressing <UP> will go back to last command entered (saves typing).
Command | Action |
---|---|
server | Start network listen server |
killserver | Stop network listen server |
port INT | Set network port number |
connect HOSTNAME | Connect to network server at HOSTNAME |
disconnect | Disconnect from network server |
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 |
---|---|
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) |
Command | Action |
---|---|
mousegrab BOOL | Set mouse grabbing on/off |
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.
The included sample WAV file is made from the Falling Mate ringtone by Plaetzchen.
The included Unit Test Framework greatest by Scott Vokes is licensed under the ISC License.
The included cmake scripts FindALUT, FindSDL2 and FindSDL2TTF are released under the Boost Software License (for FindALUT) and under the BSD License for the other two. Authors: Ryan Pavlik, Iowa State University, Eric Wing and Kitware Inc.
OpenRaider is based on code, specs, and alogrithms from:
All code should be GPLed, unless otherwise noted.
2013, 2014 improvements & clean-up by xythobuz.