Open Source Tomb Raider Engine
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

README.md 6.8KB

OpenRaider

Build Status

This project started as a fork of the OpenRaider Open Source implementation of the classic Tomb Raider Game Engine. The original project was abandoned in 2003. In the meantime, this OpenRaider has become a full rewrite of the original.

OpenRaider currently supports TR1, TR2 and TR3 files, as well as custom maps based on these engines.

Visit the IRC Channel #OpenRaider on chat.freenode.net (Webchat).

Flattr this git repo

Dependencies

Mac OS X with XCode and MacPorts installed (or replace libsdl2 by glfw):

sudo port install cmake glm libsdl2

Unfortunately, glbinding is not available as binary. But it can be built and installed from source easily. To create a distributable Bundle with glbinding in the default location, do this before running make install:

sudo install_name_tool -id /usr/local/lib/libglbinding.dylib /usr/local/lib/libglbinding.dylib

Building

The basic steps needed to build and run OpenRaider:

git clone https://github.com/xythobuz/OpenRaider.git
mkdir build && cd build
cmake ../OpenRaider
make run

If cmake can’t find OpenAL and ALUT, Sound support will be deactivated. If you want to explicitly deactivate it, call cmake with -DENABLE_AUDIO=NO.

GLFW will be used if it is found instead of SDL2, or if you call cmake with -DFORCE_GLFW=YES. Be aware that limited controller support is currently only included when building with SDL2.

Running make install on Linux will install OpenRaider to /usr/local/… (the executable in bin, the data files in share). You can change this path by passing -DCMAKE_INSTALL_PREFIX=”/some/where” to cmake.

Running make install on Mac OS X will produce a distributable OpenRaider.app bundle that includes all linked shared libraries, so it can be run without installing any dependencies.

Run make check to execute the included Unit Tests.

Run make cppcheck, make cppcheckFull or make cppcheckConfig to run a static analysis using cppcheck.

Run make format to auto-indent and format all source files using astyle.

Run make doc to create a doxygen documentation.

Configuration

OpenRaider is still somewhat depending on some configuration and data files. These can be stored in different locations, the most common one being ~/.OpenRaider. Running make setup will create/copy the necessary files and directories and an example configuration.

Place the asset files of your Tomb Raider games in the pak folder created in ~./OpenRaider. Don’t forget to copy at least the maps, the TOMBPC.DAT script (TR2/TR3 only) and the sound file MAIN.SFX (TR2/TR3 only).

Currently, you can load single level files, but the game script included with the Tomb Raider games will be read as well, if available. In the future, OpenRaider will hopefully be able to read disc images of the Tomb Raider games as well. Also, OpenRaider should run without a prepared config file in the future.

Configuration file

OpenRaider will try to load ~/.OpenRaider/OpenRaider.ini or, if it doesn’t exist, OpenRaider.ini from the current working directory.

Every line in this (text) file will be executed as an in-game console command. The # character marks the beginning of a comment until the next new-line.

Use the in-game console help for more informations about available commands and their usage.

Default Key Bindings

Key Action
<Esc> Toggle menu
q Toggle debug UI
<back quote> Toggle console
w Move forward
s Move back
a Move left
d Move right
<space> Jump
<left ctrl> crouch
Mouse Turn
MouseBtn Left Shoot/Use
MouseBtn Right Holster/Equip weapons

If SDL2 is used, the first controller connected at the start of OpenRaider can be used as well, if its type is known to SDL2. The button-mapping is not yet changeable, however.

License

The original OpenRaider is based on code, specs, and algorithms from:

  • GooseEgg/Freyja 3d Modelers by Mongoose
  • TR Rosetta Stone spec sheet by Anonymous
  • TRView 1.0.0 by Yuri Zhivago, with patches by Mongoose

All code should be GPLed, unless otherwise noted.

Forked/Rewritten in December 2013 by Thomas Buck (xythobuz@xythobuz.de).

The included example Font, Droid Sans Mono, was created by Steve Matteson and is licensed under the Apache 2.0 License.

The included TRLE Font is from Laras Levelbase.

There are some included cmake scripts:

See the respective files in cmake for their licensing.

The included clibs/commander lib is Copyright © 2012 TJ Holowaychuk (tj@vision-media.ca) and licensed under the MIT License.

The included GUI lib, imgui is Copyright © 2014 Omar Cornut. See src/deps/imgui/LICENSE for more informations about the MIT license used.

Also included is the imgui addon imguifilesystem by Flix01.