Skip to content

Commit

Permalink
Now v0.1.4. New Readme. Updated docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
xythobuz committed Mar 13, 2015
1 parent 8ebbd70 commit 0e0c094
Show file tree
Hide file tree
Showing 78 changed files with 476 additions and 1,146 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project (OpenRaider)
# Version Number
set (OpenRaider_VERSION_MAJOR 0)
set (OpenRaider_VERSION_MINOR 1)
set (OpenRaider_VERSION_MICRO 3)
set (OpenRaider_VERSION_MICRO 4)
set (OpenRaider_VERSION_RELEASE -git)

# Build Host
Expand Down
7 changes: 7 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# OpenRaider Developer Branch ChangeLog

## OpenRaider (0.1.4) xythobuz <[email protected]>

[ 20140313 ]
* Renderer now limits room list size
* Updated Doxyfile template to current Doxygen version
* Improved documentation

## OpenRaider (0.1.3) xythobuz <[email protected]>

[ 20140312 ]
Expand Down
175 changes: 50 additions & 125 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,170 +1,99 @@
# OpenRaider

[![Build Status](https://travis-ci.org/xythobuz/OpenRaider.svg?branch=loader)](https://travis-ci.org/xythobuz/OpenRaider)
[![Build Status](https://travis-ci.org/xythobuz/OpenRaider.svg?branch=master)](https://travis-ci.org/xythobuz/OpenRaider)

__This is the development branch of OpenRaider! Currently in the process of moving to OpenGL 3.3...__
This project started as a fork of the [OpenRaider](http://openraider.sourceforge.net) 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.

This is a fork of the [OpenRaider](http://openraider.sourceforge.net) Open Source implementation of the classic Tomb Raider Game Engine. The original project was abandoned in 2003.
OpenRaider currently supports TR1, TR2 and TR3 files, as well as custom maps based on these engines.

This fork aims to get OpenRaider in a more usable state, maybe one day even being able to play the old Tomb Raider games flawlessly, while bringing the code to modern standards.

Visit the IRC Channel `#OpenRaider` on `chat.freenode.net`. [Webchat](http://webchat.freenode.net/?channels=%23OpenRaider).

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!
Visit the IRC Channel `#OpenRaider` on `chat.freenode.net` ([Webchat](http://webchat.freenode.net/?channels=%23OpenRaider)).

[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=xythobuz&url=https://github.com/xythobuz/OpenRaider&title=OpenRaider&language=&tags=github&category=software)

## Installation

You can get some not-so-recent Mac releases [on the GitHub page](https://github.com/xythobuz/OpenRaider/releases).

The most recent OpenRaider version can be found on the [Arch Linux User Repos](https://aur.archlinux.org/packages/openraider-git/). Install it with your favorite aur-helper like this: `yaourt -S openraider-git`.

## Configuration

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/`.
Dust off your old Tomb Raider CDs or grab some [custom levels](http://www.aspidetr.com/levels/yvel-woods-v1-5/) from the interwebs.

## Documentation

All previously included documentation was moved into the [OpenRaider Repo Wiki](https://github.com/xythobuz/OpenRaider/wiki/_pages).

A more or less recent [Doxygen documentation](http://xythobuz.github.io/OpenRaider/) of OpenRaider should be on the Github Pages for OpenRaider.

## Dependencies

Basically, OpenRaider depends on the following:

* C++11 compiler
* cmake (>= 2.8.8)
* OpenGL (3.3 Core Profile compatible)
* GLM (>= 0.9.6)
* zlib
* SDL2 or GLFW
* OpenAL & ALUT (optional, needed for sound output)

On Mac OS X 10.9 / 10.10 with [XCode](https://developer.apple.com/xcode/) and [MacPorts](http://www.macports.org) installed, the following should be enough to get all dependencies that are available as port:

sudo port install cmake zlib glm libsdl2
* [C++11 compatible compiler](http://en.cppreference.com/w/cpp/compiler_support)
* [OpenGL](https://www.opengl.org) (3.3 Core Profile compatible)
* [cmake](http://www.cmake.org) (>= 2.8.8)
* [GLM](http://glm.g-truc.net) (>= 0.9.6)
* [SDL2](http://www.libsdl.org) or [GLFW](http://www.glfw.org)
* [OpenAL](http://www.openal.org) & [ALUT](https://github.com/vancegroup/freealut) (optional, needed for sound output)

A similar command for the package manager of your favorite Linux Distribution should do the trick.
Mac OS X with XCode and [MacPorts](http://www.macports.org) installed (or replace `libsdl2` by `glfw`):

cmake is also needed to build [freealut](https://github.com/vancegroup/freealut), which you'll need to enable sound output on Mac OS X.
Get, compile and install freealut like this:

git clone [email protected]: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.

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

There is also a windowing implementation using GLFW. It will be used if GLFW is found instead of SDL2, or if you call cmake with `-DFORCE_GLFW=YES`. Be aware that your experience will not be as nice as with SDL2...
sudo port install cmake glm libsdl2

## Building

Do a standard cmake out-of-source build to get a debug configuration and then run the resulting executable:
The basic steps needed to build and run OpenRaider:

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

On Mac OS X, running `make install` will produce a (more or less) distributable OpenRaider.app bundle, which will be put into /Applications.

On Linux, running `make install` will install OpenRaider to /usr/local/... (the executable in bin, the data files in share). You can change this path with `cmake -DCMAKE_INSTALL_PREFIX=”/some/where” ..`

Run `make check` to build and run the unit tests.

You can run a static analysis with cppcheck using `make cppcheck`, `make cppcheckFull` or `make cppcheckConfig`.

A Doxygen API documentation can be created with `make doc`.
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`.

`make clean` should remove all intermediary files. `make run` will run the binary.
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.

You can also generate working XCode Project files with `cmake -G Xcode ..`.
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.

## Usage
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.

### Configuration file
Run `make check` to execute the included Unit Tests.

OpenRaider will try to load `~/.OpenRaider/OpenRaider.ini` or, if it doesn't exist, `OpenRaider.ini` from the current directory.
Run `make cppcheck`, `make cppcheckFull` or `make cppcheckConfig` to run a static analysis using cppcheck.

Running `make setup` will create a minimal configuration in your home directory.
Run `make format` to auto-indent and format all source files using astyle.

The configuration file format is very simple:
* Every line will be executed as in-game console command
* The # character marks the beginning of a single-line comment
Run `make doc` to create a doxygen documentation.

### Level PAKs

You can use paks from any classic Tomb Raider Game (1 - 5) and most user made paks for Tomb Raider. Tomb Raider 5 support is however still very limited.

### Sound FXs

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.

OpenRaider tries to load a `MAIN.SFX` from the same folder as the selected level file.

### Default Key Bindings
## Configuration

| Key | Action |
| -----------------:|:--------------------- |
| &lt;Esc&gt; | Toggle menu |
| q | Toggle debug windows |
| w | Move forward |
| s | Move back |
| a | Move left |
| d | Move right |
| &lt;space&gt; | Jump |
| &lt;left ctrl&gt; | crouch |
| Mouse | Turn |
| MouseBtn Left | Shoot/Use |
| MouseBtn Right | Holster/Equip weapons |
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.

### Console/Config Commands
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).

Every available command should be listed in the in-game help. Just type `help` in the OpenRaider console, which can be activated by default with the backquote key.
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.

### Tomb Raider Level Editor Font support
## Configuration file

OpenRaider can read Font.pc files used by the TRLE. If the fonts glyph positions match the TR4 defaults, only a Font.pc file is required. If the positions differ, you also need a [Leikkuri/Cutter](http://trep.trlevel.de/en/downloads.html) preset file (`.lps`).
OpenRaider will try to load `~/.OpenRaider/OpenRaider.ini` or, if it doesn’t exist, `OpenRaider.ini` from the current working directory.

TRLE Font support will automatically be built and used when selecting a font in your config file ending with `.pc`.
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.

If a `.lps` is required, give it the same name as your font file.
Use the in-game console help for more informations about available commands and their usage.

I’ve made [a small writeup on my website](http://xythobuz.de/2014_06_14_trle_font.html) about this.
## Default Key Bindings

### Wireframe mode colors
| Key | Action |
| ------------------:|:--------------------- |
| &lt;Esc&gt; | Toggle menu |
| q | Toggle debug UI |
| &lt;back quote&gt; | Toggle console |
| w | Move forward |
| s | Move back |
| a | Move left |
| d | Move right |
| &lt;space&gt; | Jump |
| &lt;left ctrl&gt; | crouch |
| Mouse | Turn |
| MouseBtn Left | Shoot/Use |
| MouseBtn Right | Holster/Equip weapons |

* Red (thick) lines are portal outlines
* Red (thin) lines are triangle room polygons
* Black lines are quadralateral room polygons
* White meshes are entities
* Blue meshes are sprites
* Yellow meshes are room models
* Green lines with red endpoints are room bboxes
* Pink dots are visibility checks
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

OpenRaider is based on code, specs, and algorithms from:
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 in December 2013 by xythobuz.
Forked/Rewritten in December 2013 by Thomas Buck (xythobuz@xythobuz.de).

The included example Font, [Droid Sans Mono](http://www.droidfonts.com/licensing/), was created by Steve Matteson and is licensed under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).

Expand All @@ -181,11 +110,7 @@ There are some included cmake scripts:

See the respective files in `cmake` for their licensing.

* Copyright 2009-2010 Ryan Pavlik <[email protected]> <[email protected]>, Iowa State University, Distributed under the Boost Software License.
* Copyright 2003-2009 Kitware, Inc.
* Eric Wing

The [clibs/commander](https://github.com/clibs/commander) dependency is Copyright (c) 2012 TJ Holowaychuk ([email protected]) and licensed under the [MIT License](http://opensource.org/licenses/MIT).
The included [clibs/commander](https://github.com/clibs/commander) lib is Copyright (c) 2012 TJ Holowaychuk ([email protected]) and licensed under the [MIT License](http://opensource.org/licenses/MIT).

The included GUI lib, [imgui](https://github.com/ocornut/imgui/) is Copyright (c) 2014 Omar Cornut. See src/deps/imgui/LICENSE for more informations about the MIT license used.

Expand Down
Loading

0 comments on commit 0e0c094

Please sign in to comment.