Home

Awesome

<a name="intro"></a>

<div align="center">

image

Play in the Browser!

Appveyor Build Status Build Status Build MacOS binary License: AGPL v3 <a href="https://discord.gg/YC49E4G"><img src="https://discordapp.com/api/guilds/284464744411430912/embed.png"></img></a>

Online shooter with relentless dynamics.
Challenge your friend to an intense duel, or gather two clans to fight a spectacular war.

Written in modern C++, without a game engine!
Forever free and open-source :heart:

Comes with an in-game map Editor!

Join us:

<a href="https://discord.gg/YC49E4G"> <img src="https://github.com/TeamHypersomnia/Hypersomnia/assets/3588717/727d2858-8bf0-4198-8cc0-dfdff938a182"> </a>

<h3><a href="https://t.me/hypersomnia_io">Official Telegram channel (RU)<br/><br/><img src="https://upload.wikimedia.org/wikipedia/commons/8/82/Telegram_logo.svg" height=100></a></h3>

Get it on Steam!

<a href="https://store.steampowered.com/app/2660970/Hypersomnia"> <img src="https://upload.wikimedia.org/wikipedia/commons/8/83/Steam_icon_logo.svg" height=140 hspace=1> </a>

Download the game

<a href="https://hypersomnia.xyz/builds/latest/Hypersomnia-for-Windows.zip"> <img src="https://hypersomnia.xyz/assets/images/windows_icon.svg" height=70 hspace=1> </a> <a href="https://hypersomnia.xyz/builds/latest/Hypersomnia.AppImage"> <img src="https://hypersomnia.xyz/assets/images/linux_icon.svg" height=70 hspace=1 vspace=20> </a> <a href="https://hypersomnia.xyz/builds/latest/Hypersomnia-for-MacOS.dmg"> <img src="https://upload.wikimedia.org/wikipedia/commons/2/22/MacOS_logo_%282017%29.svg" height=70 hspace=1 vspace=20> </a> <br undefined>

Only 29 MB!

The game will start with an interactive Tutorial!

Download <a href="https://hypersomnia.xyz/builds/latest/Hypersomnia-Headless.AppImage"> <img src="https://hypersomnia.xyz/assets/images/linux_icon.svg" height=25 hspace=1 vspace=20><b>Headless Dedicated Server</b></a>

All archives are digitally signed. You can verify signatures. <br undefined>

Press

<h3><a href="https://mastodon.social/@gamingonlinux/112609228144158828"> <img src="https://github.com/user-attachments/assets/636af823-a54e-4d1a-9974-d2903e0ecf22" height=50> Liam @ GamingOnLinux</a></h3> <h3><a href=https://github.blog/2024-01-18-game-bytes-january-2024/#hypersomnia-release-on-steam> <img src="https://github.com/TeamHypersomnia/Hypersomnia/assets/3588717/2558677d-3e11-444a-bb85-8f5275434404" alt="GitHub Blog" height=50> <b>GitHub Blog</b> </a></h3>

<a href="https://pubhtml5.com/mxdt/dbwn/Linux_USA_10.2023_downmagaz.net/89"> <img src="https://upload.wikimedia.org/wikipedia/en/0/05/Linux_Magazine_international_logo.png" alt="Issue 275, page 89"> </a>

<a href="https://news.ycombinator.com/item?id=36469297"> <img src="https://upload.wikimedia.org/wikipedia/en/b/bf/Hackernews_logo.png"> </a>

<!-- *(270 votes, 40+ comments)* -->

Open Source Friend <sub>(200 votes, 20k views)</sub>

<!-- *(200 votes, 16.5k views)* -->

📰 Are you a journalist? Click here!

Watch gameplay

IMAGE ALT TEXT

IMAGE ALT TEXT

Learn to make maps!

IMAGE ALT TEXT

Latest developer journals

IMAGE ALT TEXT

IMAGE ALT TEXT

</div>

Table of contents

Introduction

Hypersomnia_discordthread

Hypersomnia is a competitive arena released as free software.

The game has been online and playable since 2017. It brings together:

Hypersomnia aims to be the ultimate open-source 2D shooter - a grand community project extensible without limit.

Declare allegiance to one of the three factions whose apple of discord is a disparity between prevailing notions of moral excellence:

Metropolis. Atlantis. Resistance.

Will you take revenge for the unethical simulation of an inferior universe? Will you support the cruel experiments to win total control over metempsychosis? Or will you join the underground civilization that awaits the end of war in this dangerous afterlife reality?

Features

Tech highlights

Background

Hypersomnia has been in development since 2013 (as seen in the commit history).

It didn't take 10 years of uninterrupted coding, though - in the meantime, I worked commercially to cover my costs of living. I saved money to be able to work less and focus on Hypersomnia. My financial decisions now let me develop the game full-time.

I use a lot of 3rdparty libraries like Box2D (physics) or yojimbo (transport layer) - everything not on this list, however, is written pretty much from scratch, in pure C++.

Many believe that writing games without an engine is no more than reinventing the wheel, or put more bluntly, a complete waste of time.

I hope this project serves as a great testament to the opposite.

Had I never embarked on this journey, I would have never made some of the interesting discoveries detailed in Tech highlights section. Video game internals are just so vast and interdisciplinary that they have limitless potential for creative breakthroughs, and it is a waste to never even entertain the idea that some widely used solutions can be replaced by something absolutely ingenious.

Quick gameplay instructions

From: https://hypersomnia.xyz/guide

You can reconfigure all bindings by going to Settings->Controls tab.

How to build

Currently, Hypersomnia is only buildable using clang. Your operating system must be 64-bit.

<!-- Formerly, the game was buildable under modern ``gcc`` versions, and also using ``MSVC`` (the Microsoft's compiler shipping with Visual Studio), but it quickly became too much of a hassle to support these compilers as we use **modern C++ constructs** throughout the entire codebase. ``gcc``, for example, would sometimes simply crash on some really template-heavy code. The project's ``CMakeLists.txt`` contains clauses for both ``MSVC`` and ``gcc``, so in the future, it might be possible to build the game under these compilers if they catch up to ``clang``. -->

Irrespectively of the OS, you will need the following software in order to build Hypersomnia:

Once dependencies are installed, go to the directory where you wish to have your Hypersomnia project downloaded, open git bash and paste:

git clone --recurse-submodules https://github.com/TeamHypersomnia/Hypersomnia

The --recurse-submodules is necessary to clone the submodules as well.

Wait for the download to complete. Next steps depend on the platform you are on.

On all platforms, you can choose among three building configurations:

Windows instructions

Refer to appveyor.yml file for up-to-date building procedure. A short overview of the process now follows.

Prerequisites:

Open up the standard Windows cmd prompt (it won't work with PowerShell or others). Setup the environment:

call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64

(If the file cannot be found, it means you are not using Visual Studio 2022 Community. You will have to look for a corresponding vcvarsall.bat location on your own.)

Next, run these commands:

cd Hypersomnia
mkdir build
cd build
set CONFIGURATION=RelWithDebInfo
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 -DOPENSSL_ROOT_DIR=C:\OpenSSL-Win64 ..
ninja

This will build a non-Steam client by default. To build a Steam client, add a -DLINK_STEAM_INTEGRATION=1 flag to the cmake command.

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 cmake command.

If the game builds successfully, run this command to launch it:

ninja run

If you built with -DLINK_STEAM_INTEGRATION=1, don't forget to create a hypersomnia/steam_appid.txt file with 2660970 in it. Otherwise the game will try to restart itself through Steam.

<!-- Note that the 64-bit version is more likely to be kept up to date. --> <!-- Resultant ```.sln``` and ```.vcxproj``` files should appear in the ```build/``` directory. Open ```Hypersomnia.sln``` file, select **Release** configuration and hit **F7** to build the game. **F5** should launch it. -->

If, for some reason, some step fails, refer to the latest working Appveyor build and the relevant appveyor.yml file.

Linux instructions

Refer to Linux_build.yml file for up-to-date building procedure - it is constantly in flux. A short overview of the process now follows.

Current platforms are actively tested and supported:

Distribution-specific dependencies

Arch Linux:

Ubuntu:

sudo apt-get install cmake ninja-build libxcb-keysyms1 libxcb-keysyms1-dev libxi6 libxi-dev alsa-oss osspd-alsa osspd libasound2 libasound2-dev p7zip p7zip-full libgl1-mesa-dev libxcb-glx0-dev libx11-xcb-dev

One-shot launch

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

Detailed instructions

Use your favorite shell to enter the repository's directory. Then run:

cmake/build.sh [Debug|Release|RelWithDebInfo] [x86|x64] ["ADDITIONAL CMAKE FLAGS"]

For example:

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.

Invoking ninja

<!-- If you are building with ``clang``, make sure to call these exports before invoking ``ninja``: ``` export CXX=clang++; export CC=clang; ``` This is because some third-party libraries - freetype, for example - generate their Makefiles only after calling ``ninja`` on the Hypersomnia's ``build.ninja`` itself. (if GCC build fails for some reason, add respective exports as well.) -->

There are several additional ninja targets defined:

ninja run

Launches the game normally.

ninja tests

Launches unit tests only and exits cleanly.

The above targets set the working directory automatically to ${PROJECT_SOURCE_DIR}/hypersomnia.

If, for some reason, some step fails, refer to the latest working Linux_build.yml file.

If the game fails to launch, it should automatically open a log file with the relevant message using $VISUAL executable.

File dialogs integration

You might want to follow some additional configuration to make the experience better on Linux.

Opening and revealing files

The Hypersomnia editor can reveal files in explorer. Also, the game may prompt you to select a file, e.g. to choose the avatar. On Windows, this is accomplished through an IFileDialog.
Needless to say, such a class does not exist on Linux.
Hypersomnia provides shell scripts for common file managers in hypersomnia/detail/unix/managers.
You'll need one for choosing a file to open and one for revealing files in explorer.
cd to hypersomnia/detail/unix and, assuming you want to use ranger as your file manager, create symlinks as such:

ln -s managers/reveal_file_ranger.zsh reveal_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:

MacOS instructions

Refer to MacOS_build.yml file for up-to-date instructions.

Contributing

Pull requests are welcomed, should they even be typo fixes or missing const guarantees. If you 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.

A WIP documentation can be found at wiki.

Make sure to check out TeamHypersomnia for other repositories that are useful when setting up your own custom servers.

If you have questions or you fail to build Hypersomnia, reach out on Discord. Or if you just can't wait to utter some brilliant ideas with regard to the game, please do so, too!