Latest Windows binaries: https://ci.appveyor.com/project/geneotech/hypersomnia/build/artifacts
The latest Linux binary has to be built manually.
- How to build
Hypersomnia is an upcoming community-centered shooter released as free software, with an aspiration to one day become an MMO with elements of RPG.
Set in a hypothetical afterlife reality, it shall provide joy through altruistic behaviours, fierce fights, exploration, fulfillment of elaborate social roles or sowing panic as a traitor to benevolent ones.
Declare allegiance to one of the three factions whose apple of discord is a disparity between prevailing notions of moral excellence. Metropolis. Atlantis. Resistance.
Watch gameplays on YouTube:
How to build
Currently, Hypersomnia is only buildable using
clang (7.0.0 or newer), both on Linux and Windows.
Additionally, the system must be 64-bit.
CMakeLists.txt contains clauses for both
so in the future, it might be possible to build the game under these compilers if they catch up with
Irrespectively of the OS, you will need some dependencies installed to build Hypersomnia:
- The newest CMake.
- git to clone the respository and later generate version information.
- Optional: Python 3.6 or newer for the script that prepares an archive with the executable.
- Optional: 7-Zip so that the Release configuration can automatically create a compressed archive with the executable and game resources, ready to be sent to someone.
- Note that Continuous Integration systems always upload the build artifacts anyway.
Once dependencies are installed, go to the directory where you wish to have your Hypersomnia project downloaded, open git bash and paste:
git clone --depth 1 --recurse-submodules https://github.com/TeamHypersomnia/Hypersomnia
--depth 1 parameters forces a shallow clone which will drastically reduce the download size.
--recurse-submodules is necessary to clone the submodules as well.
Once repository finishes downloading, create a
build/ folder next to
Next steps depend on the platform you are on.
On all platforms, you can choose among three building configurations:
Debug- the fastest to build and provides debug information.
Recommended for normal development.
Release- takes AWFULLY long to build because of link-time optimizations.
No debug information. Use only for production builds. Specifies
IS_PRODUCTION_BUILD=1C++ preprocessor define.
RelWithDebInfo- Same as
Releasebut with debug info and without link-time optimizations.
Preferred choice for quickly testing how the game's mechanics play at normal speed, and also for debugging performance problems.
- Visual Studio 2017 Preview (Community) or newer.
ninjainstalled somewhere in PATH.
- LLVM 7 toolchain (or newer).
- For example, use this installer: http://releases.llvm.org/7.0.0/LLVM-7.0.0-win64.exe
Use your favorite shell to go into the newly created
build/ folder and run these commands:
call "C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 set CONFIGURATION=Release cmake -G Ninja -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_LINKER=lld-link -DARCHITECTURE="x64" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DGENERATE_DEBUG_INFORMATION=0 .. ninja
Note: the path to
vcvarsall.bat in the first line may differ if you're using a version of Visual Studio that is not Visual Studio 2017 Preview Community.
Note: your computer might start lagging heavily for the duration of the build as
ninja will use all available cores for compilation.
If you intend to develop the game, it is best to use "Debug" configuration for the fastest builds.
If you want to somehow customize your build, e.g. disable certain game features, refer to the beginning of
CMakeLists.txt to see which options you can pass to the
If the game builds successfully, issue these commands to launch it:
cd ../hypersomnia "../build/Hypersomnia.exe"
If, for some reason, some step fails, refer to the latest working Appveyor build and the relevant
Current platforms are actively tested and supported:
- Arch Linux with i3 window manager.
- Ubuntu, but it is tested only through Travis builds.
Once the dependencies are all set, this is the complete script for building and launching the game from scratch, with RelWithDebInfo configuration:
git clone --depth 1 --recurse-submodules https://github.com/TeamHypersomnia/Hypersomnia cd Hypersomnia export CXX=clang++; export CC=clang; cmake/build.sh RelWithDebInfo x64 ninja run -C build/current
Use your favorite shell to enter the repository's directory. Then run:
cmake/build.sh [Debug|Release|RelWithDebInfo] [x86|x64] ["ADDITIONAL CMAKE FLAGS"]
export CXX=clang++; export CC=clang; cmake/build.sh Debug x64
After which, the resultant
build.ninja should appear in the build/Debug-x64-clang directory.
Example for gcc:
export CXX=g++; export CC=gcc; cmake/build.sh Debug x64
After which, the resultant
build.ninja should appear in the build/Debug-x64-gcc directory.
There are several additional ninja targets defined:
Launches the game normally.
Launches unit tests only and exits cleanly.
The above targets set the working directory automatically to
If, for some reason, some step fails, refer to the latest working Travis build and the relevant
If the game fails to launch, it should automatically open a log file with the relevant message using
If you plan to use the Hypersomnia editor on Linux, you might want to follow some additional configuration to make the experience better.
Opening and saving files
The Hypersomnia editor can choose directories for opening projects and saving them.
On Windows, this is accomplished through an
Needless to say, such a class does not exist on Linux.
Hypersomnia provides shell scripts for common file managers in
You'll need one for choosing a directory and one for revealing files in explorer.
hypersomnia/scripts/unix and, assuming you want to use
ranger as your file manager, create symlinks as such:
ln -s managers/choose_directory_ranger.zsh choose_directory.local ln -s managers/reveal_file_ranger.zsh reveal_file.local
The framework also supports calling scripts for opening and saving files,
though the project does not use this functionality yet:
ln -s managers/save_file_ranger.zsh save_file.local ln -s managers/open_file_ranger.zsh open_file.local
None of the symlinks will be tracked by git.
Currently, the following file managers are supported:
- ranger through
To implement your own script for choosing a directory:
- Use a
$TERMINALvariable for file managers that need a terminal to run on.
Ensure your terminal supports
-eflag that passes the commands to launch on startup.
- Output a
$PWD/cache/gen/last_file_path.txtfile containg the result - which is the chosen path, e.g.
Pull requests are welcomed, should they even be typo fixes, missing const guarantees or changes in nomenclature. If you however plan to add a completely new feature, create a relevant issue so that everybody knows about it, because the project is continuously in a very, very active development and may undergo a revolution when it is the least expected.
For documentation, please make sure to read the wiki to learn about the game and the source code.
You will be added to TeamHypersomnia organization once at least one of your pull requests is accepted.
If you have questions or you fail to build Hypersomnia, create an issue. Or if you just can't wait to utter some brilliant ideas with regard to the game, please do so, too!