Skip to content

OpenApoc/OpenApoc

Repository files navigation

OpenApocalypse Tweet

OpenApoc is an open-source re-implementation of the original X-COM: Apocalypse, that requires the original files to run, licensed under the GPL3 and written in C++ / SDL2. It was originally founded by PmProg in July 2014, and has since grown in community.

Linux Build Status Windows Build Status Openapoc issues Translate OpenApoc OpenApoc GPL3 license
Openapoc forum Openapoc IRC chat Openapoc Discord Openapoc Facebook Openapoc Vkontakte Openapoc Reddit Openapoc Youtube

Table of Contents

Copyright

All rights for the original game and its resources belong to their respective owners. We do not encourage and do not support any form of illegal usage of the original game. We strongly advise to purchase the original game on GOG or other platforms. Pirated ISOs are not supported and will cause issues such as crashes and map problems with OpenApoc.

Key Features

  • Unlimited modding capabilities, which was not possible in the original
  • Port the game to any platform you like (windows, linux, android etc)
  • Support for modern screen resolutions
  • Added a full debug system (hot keys, etc.)
  • Added 'more options' menu (with more than 40 improvements)
  • Added skirmish module (fast fight)
  • The new engine has ample opportunities for expansion and changes:
    • High FPS, smooth sound during the game without bugs from original
    • No limitations which were in vanilla
    • Modern formats
  • After release, we can add Julian Gollop's cut ideas to the game through mods. Many have already been added but they need functionality and balance.
  • Julian Gollop "Yes, I am aware of the openApoc project and I very much do support it."
  • Fans creating Big Apoc Concept, for modders, thats should make OpenApoc more balanced, to provide:
    • A variety of interesting gameplay solutions
    • Make the game more complex and diverse
    • L.O.R.E more fulfilling, deep and mysterious, intertwined with real history and other games
    • Ending the game can be more interesting and less predictable

What's left?

  1. TO HAVE A TRULY PLAYABLE ALPHA STATE (DONE)
  2. TO REACH A BETA STATE (When All features implemented)
  3. TO REACH OPENAPOC RELEASE 1.0
  4. Modding Functions, Extra Features, Enhancements and Quality of Life Updates

Contribute and FAQ

http://openapoc.org/#contribute

Here you find news, detailing how you can participate in project. You can support the project by testing, translating, modding, drawing, modeling, concepting etc..

http://openapoc.org/#faq

Here you find the detailed FAQ (frequently asked questions)

Building

OpenApocalypse is built leveraging a number of libraries - to provide needed functionality (and save us the time of implementing it badly ourselves). Note: The following libraries will be fetched and built with vcpkg in a later step, ensuring you get the correct version.

  • SDL2
  • Boost - We specifially use the 'locale' library, used for localisation, 'algorithm' for some small stuff in string handling, 'program-options' for settings management, 'date-time' for some formatting, and parts of 'UUID' and 'CRC' for their hash functions and some temporary filename stuff.
  • Qt - needed for the launcher, can be disabled with 'BUILD_LAUNCHER'.
  • Libunwind - debug backtracing on linux - not needed on windows.
  • LibVorbis - Ogg vorbis music decoder library.

The following libraries are also used, but are shipped as submodules in the repository and directly included in the build, so you don't need to install these dependencies to build or use OpenApoc.

  • GLM - Math library.
  • libsmacker - Decoder for .smk video files.
  • lodepng - Reading/writing PNG image files.
  • Lua - Scripting language.
  • miniz - Zlib-comptible compression library.
  • physfs - Library for reading data from .iso files or directory trees (Note: We use a patched version, available on GitHub - required to read the .iso files we use).
  • pugixml - XML library used for reading/writing the game data files.
  • fmtlib - A c++ string formatting library - proposed for c++20 standard.

Building on Windows

  • Install Visual Studio (2017 or later) with "Desktop Development with C++" workload.
  • Install a Git client eg. Github Desktop.
  • Checkout OpenApoc from GitHub.
  • If you are using the GitHub Desktop client, the submodules should already be setup at first checkout. If not, or if the submodules have been updated, run the following commands in the 'git shell' from the root of the OpenApoc repository. This should reset the submodule checkouts to the latest versions (NOTE: This will overwrite any changes to code in the dependencies/ directory).
git submodule update --init --recursive
  • All the other dependencies (Boost, SDL2, Qt) need to be supplied separately. Install Vcpkg and integrate with Visual Studio. If you'd rather install them manually, run the following command:

    • For x64 builds:
vcpkg --triplet x64-windows install sdl2 boost-locale boost-program-options boost-uuid boost-crc qt5-base libvorbis
  • For x86 builds:
vcpkg --triplet x86-windows install sdl2 boost-locale boost-program-options boost-uuid boost-crc qt5-base libvorbis
  • For list of all supported by Vcpkg architectures: vcpkg help triplet

  • Copy the original XCom:Apocalypse .iso file into the "data/" directory. This could also be a directory containing all the extracted files from the CD, and it should be named the same (IE the directory should be data/cd.iso/). This is used during the build to extract some data tables.

  • Open the OpenApoc directory in Visual Studio (if you don't have an Open Folder option, generate a project with CMake).

  • Set your configuration to x64-Release or x86-Release (must match your Vcpkg dependencies). Release is recommended as Debug is very slow.

  • Visual Studio should automatically detect and configure CMake appropriately. If you didn't integrate Vcpkg, you will need to manually add it to your CMake Settings file:

    • Visual Studio 2017:
"variables": [
    {
        "name": "CMAKE_TOOLCHAIN_FILE",
        "value": "<path to vcpkg>\\scripts\\buildsystems\\vcpkg.cmake"
    }
]
  • Visual Studio 2019: Build > CMake Settings > Toolchain file > <path to vcpkg>\\scripts\\buildsystems\\vcpkg.cmake

  • Build OpenApoc. This will take a while on the first build, especially if Vcpkg hasn't installed all the dependencies yet. If you get errors, clear your cache from the Project/CMake menu and try again.

  • When running OpenApoc from the Visual Studio UI, the working directory is set to the root of the project, so the data folder should already be in the right place. If you want to run outside of Visual Studio, you need to copy the whole 'data' folder (including the cd.iso file) into the folder openapoc.exe resides in.

Building on Linux

(Tested on Ubuntu 22.04)

  • On Ubuntu, install the following packages:
sudo apt-get install sdl2-dev cmake build-essential git libunwind8-dev libboost-locale-dev libboost-program-options-dev qtbase5-dev libvorbis-dev
  • On Mageia, install the following packages as root:
urpmi "cmake(sdl2)" libstdc++-static-devel boost-devel boost unwind-devel task-c++-devel cmake git qtbase5-devel libvorbis-devel
  • On Fedora or other RedHat distro, install the folowing packages as root:
yum groupinstall "Development Tools" "Development Libraries"
yum install git SDL2-devel cmake libunwind-devel qt5-qtbase-devel libvorbis-devel
  • Checkout OpenApoc from GitHub.
  • Fetch the dependencies from git with the following terminal command (run from the just-created OpenApoc folder).
git submodule update --init --recursive
  • Copy the cd.iso file to the 'data' directory under the repository root (Note - despite dosbox having good linux support, the steam version of X-Com Apocalypse will only install if Steam Play is enabled).
cp /path/to/cd.iso data/
  • Create a subdirectory ('build' in this example) in the OpenApoc checkout directory, and from that use cmake to configure OpenApoc.
cd /path/to/OpenApoc
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
  • This cmake command will fail if we're missing a dependency, or your system is for some other reason unable to build - if you have any issues please contact us (see above for links).
  • Build the project with the following command.
make -j4
  • This should create a directory 'bin' under the build directory, with the 'OpenApoc' executable file. OpenApoc by default expects the data folder to be in the current working directory, so running the executable from the root of the git checkout should work.
./build/bin/OpenApoc

Building on macOS

(Tested on macOS Ventura 13.0 (22A380)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Checkout OpenApoc from GitHub:
git clone https://github.com/OpenApoc/OpenApoc.git
  • Fetch the dependencies from git with the following terminal command (run from the just-created OpenApoc folder):
cd /path/to/OpenApoc
git submodule update --init --recursive
  • Use the homebrew install the following dependencies:
brew install cmake boost pkg-config sdl2 qt@5 libvorbis
echo 'export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"' >> ~/.bashrc
  • Copy the cd.iso file to the 'data' directory under the repository root (Note - despite dosbox having good linux support, the steam version of X-Com Apocalypse will only install if Steam Play is enabled).
cp /path/to/cd.iso data/
  • Create a subdirectory ('build' in this example) in the OpenApoc checkout directory, and from that use cmake to configure OpenApoc.
cd /path/to/OpenApoc
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
  • This cmake command will fail if we're missing a dependency, or your system is for some other reason unable to build - if you have any issues please contact us (see above for links).
  • Build the project with the following command:
make -j4
  • This should create a directory 'bin' under the build directory, with the 'OpenApoc' executable file. OpenApoc by default expects the data folder to be in the current working directory, so running the executable from the root of the git checkout should work.
cd ..
open ./build/bin/OpenApoc.app

OpenApoc Coding Style

https://www.ufopaedia.org/index.php/Coding_Style_(OpenApoc)

This document specifies the guidelines for writing and formatting the c++ code that forms the core of OpenApoc.

How to setup OpenApoc

OPENGL 2.0 SUPPORTIVE VIDEO CARDS ARE REQUIRED

WINDOWS USERS: You will require the LATEST Visual C++ Libraries obtained from windows update to run OpenApoc https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170

(Keep in mind that OpenApoc is ALPHA STATE - this means bugs, crushes and not all features implemented, use our bug-tracker at https://github.com/OpenApoc/OpenApoc/issues to report bugs and navigate known ones)

  1. Download the OpenApoc core files: Windows Build Status (Latest master build)
  • If the build link above doesn't work, visit https://ci.appveyor.com/project/OpenApoc/openapoc/history
  • If you see a green bar next to the latest build then you can download it, click a build that is green, or use "Show More" to list all builds
  • Click ARTIFACTS (Currently only Windows x64)
  • If there are no artifacts use https://github.com/OpenApoc/OpenApoc/releases for the latest Winx64 compile
  • Download the option that ends with a ".exe" (and without "debug" in it)
  • Run the downloaded exe installer, this will guide you through the installation
  • Use "portable install" if you want saves and settings to remain in the install directory
  1. Acquire the original X-Com Apocalypse CD-ROM and create an ISO Image of that, or use Steam's "cd.iso" or GOGs "xcom.cue"/"xcom.bin"
  • If you have already specified the "cd.iso" location in the installer, you don't need to do this step
  • You need have all files in the disc ISO file including MUSIC so only legit ISOs will work and not torrents that often lack the music
  • If the disc image is in .iso format, rename it to "cd.iso"
  • We also support the GOG .cue / .bin files!
  1. Put cd.iso (image or folder) into the data folder under the specified OpenApoc install folder
  • If you have already specified the "cd.iso" location in the installer, you don't need to do this step
  • To use GOG .cue/.bin you rename the XCOM.cue file to "cd.iso", put that in the OpenApoc data folder, then put the XCOM.BIN, without renaming it, into the data folder too
  1. Run and enjoy!

Contact us

If you're interested, please visit our website.