OpenSource-Reimplementation of the zEngine, used by the game "Gothic"
C++ CMake C Java Shell Makefile Other
Switch branches/tags
nightly-0.4.277 nightly-0.4.275 nightly-0.4.271 nightly-0.4.269 nightly-0.4.267 nightly-0.4.266 nightly-0.4.265 nightly-0.4.264 nightly-0.4.263 nightly-0.4.260 nightly-0.4.254 nightly-0.4.252 nightly-0.4.250 nightly-0.4.242 nightly-0.4.241 nightly-0.4.239 nightly-0.4.237 nightly-0.4.236 nightly-0.4.235 nightly-0.4.231 nightly-0.4.228 nightly-0.4.227 nightly-0.4.220 nightly-0.4.219 nightly-0.4.216 nightly-0.4.213 nightly-0.4.212 nightly-0.4.211 nightly-0.4.198 nightly-0.4.196 nightly-0.4.189 nightly-0.4.186 nightly-0.4.183 nightly-0.4.180 nightly-0.4.179 nightly-0.4.178 nightly-0.4.177 nightly-0.4.176 nightly-0.4.175 nightly-0.4.174 nightly-0.4.173 nightly-0.4.172 nightly-0.4.170 nightly-0.4.169 nightly-0.4.168 nightly-0.4.167 nightly-0.4.166 nightly-0.4.164 nightly-0.4.163 nightly-0.4.162 nightly-0.4.157 nightly-0.4.156 nightly-0.4.152 nightly-0.4.151 nightly-0.4.148 nightly-0.4.147 nightly-0.4.146 nightly-0.4.145 nightly-0.4.142 nightly-0.4.141 nightly-0.4.140 nightly-0.4.139 nightly-0.4.138 nightly-0.4.137 nightly-0.4.136 nightly-0.4.135 nightly-0.4.134 nightly-0.4.127 nightly-0.4.126 nightly-0.4.125 nightly-0.4.123 nightly-0.4.121 nightly-0.4.117 nightly-0.4.115 nightly-0.4.114 nightly-0.4.113 nightly-0.4.112 nightly-0.4.111 nightly-0.4.110 nightly-0.4.108 nightly-0.4.107 nightly-0.4.104 nightly-0.4.102 nightly-0.4.93 nightly-0.4.92 nightly-0.4.91 nightly-0.4.90 nightly-0.4.89 nightly-0.4.88 nightly-0.4.87 nightly-0.4.86 nightly-0.4.85 nightly-0.4.80 nightly-0.4.74 nightly-0.4.68 nightly-0.4.67 nightly-0.4.66 nightly-0.4.65 nightly-0.4.61 nightly-0.4.59
Nothing to show
Clone or download
Latest commit 778a5cf Jun 23, 2018
Permalink
Failed to load latest commit information.
REGoth-Android Correct Android building to make it compile with newer Gradle versions Apr 23, 2018
bin Fix android build May 11, 2018
cmake Proper clang-format call Jul 3, 2017
content Fixed particle effects turning fog-colored in the distance May 20, 2018
hooks fixed pre-commit hook when formatting more than one file Oct 25, 2017
lib Merge branch 'master' into oneShotPfx May 16, 2018
src Merge pull request #344 from REGoth-project/ParticleAvoidCopy Jun 23, 2018
toolchain Added mingw toolchain for cross compiling to windows from linux Jun 8, 2016
.clang-format clang-format: fixed pointer alignment Jul 30, 2017
.gitattributes Visual-Studio specific fixes Jun 26, 2016
.gitignore GitIgnore: re-allowed .json files Oct 16, 2017
.gitmodules Add libmdusic module Nov 15, 2017
.travis.yml /opt already exists, no need to mkdir it Apr 19, 2018
.ycm_extra_conf.py Replaced absolute path with relative in ycm_extra_conf Jan 3, 2017
CMakeLists.txt Merge branch 'master' of github.com:REGoth-project/REGoth into music Apr 23, 2018
LICENSE.md Create LICENSE.md Jun 5, 2016
README.md Update building instructions in README Apr 28, 2018
create_git_hooks.sh fixed incorrect creation of symlink Sep 6, 2017
update_ctags_cscope.sh Removed update_ctags_cscope.sh script from gitignore Jan 3, 2017
update_git.bat Changed info about how the repository should be updated Nov 27, 2016
update_git.sh Changed info about how the repository should be updated Nov 27, 2016

README.md

REGoth Build status Build Status Gitter

OpenSource-Reimplementation of the zEngine, used by the game "Gothic" and "Gothic II".

Don't forget to check out the REGoth-Wiki for more information about the project!

A list showing the current state of the engine, can be found here.

Videos showing the current state

Download (Latest stable version)

Version 0.4 (Windows): https://github.com/REGoth-project/REGoth/releases/tag/0.4

Version 0.4 (Android): https://github.com/REGoth-project/REGoth/releases/tag/0.4-android

Automated nightly builds: https://github.com/degenerated1123/REGoth/releases

Source

Make sure to clone this repository with the --recursive flag:

ssh:
git clone --recursive git@github.com:degenerated1123/REGoth.git
https:
git clone --recursive https://github.com/degenerated1123/REGoth.git

To update the repo, you need to make sure to update the submodules as well. Instead of simply pulling the repository, you can do:

git pull --recurse-submodules

Building

Note: If you are missing packages or are having trouble building on your platform, you can check out this wiki-page, which may contain more detailed instructions. If you don't find your platform there, I'd kindly ask you to add some instructions for other people to that wiki-page!

You will need CMake (3.1 or newer) and a C++14-capable compiler. Currently supported/tested are:

  • GCC (6.x)
  • MinGW
  • Visual Studio 2015, 2017

You will also need a copy of libsndfile installed on your computer.

Obtaining libsndfile

*nix systems (Linux, BSD, macOS)

On most *nix systems, this can be obtained using a package manager, for example on Debian/Ubuntu:

$ sudo apt install libsndfile1-dev

Or on macOS

$ brew install libsndfile # Needs Homebrew

Windows

libsndfile will need to be compiled separately. Create a directory somewhere on your system to store the compiled files, then run

mkdir build-libsndfile
cd build-libsndfile
cmake -D CMAKE_INSTALL_PREFIX=compiled/files/folder path/to/REGoth/lib/libdmusic/utils/dls2sf/lib/libsndfile
cmake --build . --target install --config Release

Compiling REGoth

Then:

cd path/to/REGoth
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release .. # On *nix systems this is sufficient
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=compiled/files/folder .. # On Windows

If CMake complains about some folders missing a CMakeLists.txt, you most likely forgot to clone with the --recursive-flag! Simple do git submodule update --init --recursive and it should work.

Then, choose depending on your OS:

Linux, MacOS and other *nix

make -j4

Windows

Starting Visual Studio 2017 you can use the integrated cmake functionality to open the cloned folder.
Check out the how to build wiki page for details on this.

For previous versions of Visual Studio, open the generated REGoth.sln and build as usual.
Alternatively, you may run this command inside of the build folder:

cmake --build . --config release

Running

The compiled files are inside the build/bin directory.

Make sure to copy the content/shaders folder to the working directory of the compiled REGoth-Executable. Then, run the program with the following flags:

REGoth -g "path/to/gothic1or2" -w startworld.zen

Where path/to/gothic1or2 points to the root of a Gothic I or II installation and startworld.zen is one of the Zen-Files found in a .vdf-files in the games data/-directory. For example: newworld.zen or addonworld.zen for Gothic II.

It is recommended to run this from the commandline, to see the debug-output of the program.

Additionally, for a list of possible commands, run REGoth --help.

Controls

  • Movement: WASD/QE or arrow-keys (Space or Shift to run faster)
  • Actions: Left CTRL for everything
  • Menus: B for status-screen
  • Console: F10
    • Available commands (square brackets mean optional argument):
      • tp [<teleporter:default=player>] <target>: Teleport NPC teleporter (= player if none is given) to NPC target
      • goto waypoint <waypoint>: Teleport player to waypoint
      • kill [<npc>]: Kill npc or a nearby NPC if none is given
      • knockout [<npc>]: Knockout npc or a nearby NPC if none is given
      • save <slotindex>: Save the game to the given slot
      • load <slotindex>: Load the game from the given slot
      • switchlevel <zenfile>: Switch to an other level in current session
      • usemana <amount>: Use mana
      • hurtself <amount>: Hurt yourself
      • set clock <hour> [<min:default=0>]: Set time of day to hour:min
      • control <npc>: Take control over npc

Development

If you want to help out and don't know where to start, I suggest reading the wiki-page, which contains information about the engine-layout and lists of which features are missing (Not yet, though!).

Examples

Gothic 1 - Overworld: REGoth -g "path/to/gothic1" -w world.zen

Gothic 1 - Oldmine: REGoth -g "path/to/gothic1" -w oldmine.zen

Gothic 1 - Freemine: REGoth -g "path/to/gothic1" -w freemine.zen

Gothic 1 - Orc graveyard: REGoth -g "path/to/gothic1" -w orcgraveyard.zen

Gothic 1 - Sleeper temple: REGoth -g "path/to/gothic1" -w orctempel.zen

Gothic 2 - Overworld: REGoth -g "path/to/gothic2" -w newworld.zen

Gothic 2 - Valley of mines: REGoth -g "path/to/gothic2" -w oldworld.zen

Gothic 2 - Addonworld: REGoth -g "path/to/gothic2" -w addonworld.zen

Gothic 2 - Dragonisland: REGoth -g "path/to/gothic2" -w dragonisland.zen