# Hypersomnia
**Repository Path**: chenbin2121/Hypersomnia
## Basic Information
- **Project Name**: Hypersomnia
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: AGPL-3.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-12-02
- **Last Updated**: 2025-12-02
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 

# [▶ Play in the Browser!](https://hypersomnia.io/)
[](https://github.com/TeamHypersomnia/Hypersomnia/actions/workflows/Windows_build.yml)
[](https://github.com/TeamHypersomnia/Hypersomnia/actions/workflows/Linux_build.yml)
[](https://github.com/TeamHypersomnia/Hypersomnia/actions/workflows/MacOS_build.yml)
[](https://www.gnu.org/licenses/agpl-3.0)

[](https://t.me/hypersomnia_io)
**The community-driven multiplayer shooter.**
Challenge your friend to an intense duel, or gather two clans to fight a spectacular war.
### [▶ Watch Trailer](https://www.youtube.com/watch?v=L4zSA34fD_E "Video Title")
Written in modern C++, **without a game engine!**
Forever free and open-source :heart:
*Comes with an [in-game map Editor!](https://hypersomnia.io/editor/official)*
# Download the game
|
|

|

|

|
|:--:|:--:|:--:|:--:|
| [Steam](https://store.steampowered.com/app/2660970/Hypersomnia) | [Windows](https://hypersomnia.xyz/builds/latest/Hypersomnia-for-Windows.zip) | [Linux](https://hypersomnia.xyz/builds/latest/Hypersomnia.AppImage) | [macOS](https://hypersomnia.xyz/builds/latest/Hypersomnia-for-MacOS.dmg) |
Only 29 MB!
The game will start with an **interactive Tutorial!**
Run the [
Server Docker](./README_SERVER.md#docker-setup)
Or download
Server AppImage
*All archives are [digitally signed.](https://github.com/TeamHypersomnia/Hypersomnia/blob/master/src/signing_keys.h) You can [verify signatures.](https://hypersomnia.xyz/builds/latest/)*
# Press
| [

](https://mastodon.social/@gamingonlinux/112609228144158828) | [

](https://github.blog/2024-01-18-game-bytes-january-2024/#hypersomnia-release-on-steam) | [

](https://www.scribd.com/document/763273177/Linux-Magazine-October-2023-USA#page=89) | [

](https://news.ycombinator.com/item?id=36469297) |
|:--:|:--:|:--:|:--:|
| [Liam @ GamingOnLinux](https://mastodon.social/@gamingonlinux/112609228144158828) | [GitHub Blog](https://github.blog/2024-01-18-game-bytes-january-2024/#hypersomnia-release-on-steam) | [Linux Magazine, Issue 275](https://www.scribd.com/document/763273177/Linux-Magazine-October-2023-USA#page=89) | [Hacker News Discussion](https://news.ycombinator.com/item?id=36469297) |
#### *📰 Are you a journalist? [Click here!](https://github.com/TeamHypersomnia/PressKit/blob/main/README.md#intro)*
## Latest developer journals
|

|

|
|:--:|:--:|
## Join the community!
# Table of contents
- [Introduction](#introduction)
- [Tech highlights](#tech-highlights)
- [Game guide](#game-guide)
- [How to build](#how-to-build)
- [Contributing](#contributing)
- [Credits 🇵🇱](https://teamhypersomnia.github.io/PressKit/credits)
- [The story behind the code](#the-story-behind-the-code)
# Introduction

Hypersomnia has been online and playable **since 2017**. It brings together:
- the tactics of *Counter-Strike*,
- the dynamics of *Hotline Miami*,
- the pixel art nostalgia of oldschool RPGs...
- ...and an **in-game map editor** lets you instantly playtest a **work-in-progress map** with your friends, **even behind a router!**
- [▶ Learn how to make maps!](https://www.youtube.com/watch?v=q1rfIy06_xo)
Today, we have **[24 unique firearms](https://hypersomnia.xyz/weapons)**, **[10 community maps](https://hypersomnia.xyz/arenas)**, and two game modes: *Bomb defusal* and *Gun game*.
We aim to become ***the ultimate open-source 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?
# Tech highlights
- **[rectpack2D,](https://github.com/TeamHypersomnia/rectpack2D) written for packing textures, became famous and was used in [Assassin's Creed: Valhalla.](https://www.youtube.com/watch?v=2KnjDL4DnwM&t=2382s)**
- Used also by [a drone manufacturing company](https://pages.skydio.com/rs/784-TUF-591/images/Open%20Source%20Software%20Notice%20v0.2.html) and in [2 scientific papers.](https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=teamhypersomnia&btnG=)
- My Entity-Component-System **[idea from 2013](https://gamedev.stackexchange.com/questions/58693/grouping-entities-of-the-same-component-set-into-linear-memory/)** describes techniques similar to **[Unity Engine patent from 2018.](https://patents.google.com/patent/US10599560B2/en)**
- **[See this discussion.](https://github.com/TeamHypersomnia/Hypersomnia/issues/264)**
- Networking is based on **cross-platform simulation determinism**. It is 100% deterministic **even across browser** ***and*** **native clients** (Windows, Linux, MacOS) and that includes **native ARM builds (aarch64)!**
- This technique is traditionally used by RTS games with hundreds of continuously moving soldier units.
- It is impractical to continuously update every single one of them through the network.
- Instead, only the player inputs are transmitted ("I moved mouse here", "I pressed this button") - the clients simulate *everything else* locally, on their own. Think playing chess with your friend over the phone. You won't ever say aloud the entire state of the chessboard, only the movements ("Queen to H5").
- But *Hypersomnia* is not an RTS - since it's physics-based, it uses *floats* heavily, not just *integers*.
- When floating point calculations are involved, simulation determinism becomes **extremely hard.**
- See why in this [excellent article by Glenn Fiedler.](https://gafferongames.com/post/floating_point_determinism/)
- To achieve it in *Hypersomnia*, I had to:
- Use the same compiler - ``clang`` - on **all** OSes. It's very nice of LLVM to be ieee754-compliant by default.
- Pass ``/fp:strict`` for Windows builds.
- Pass ``-ffp-model=strict`` for the ARM builds.
- Replace all math functions like ``std::sin``, ``std::sqrt`` by these from [STREFLOP.](https://nicolas.brodu.net/programmation/streflop/index.html)
- ..after which ``streflop::sqrt`` became a huge bottleneck - thankfully, I found another efficient [ieee754-compliant implementation.](https://github.com/TeamHypersomnia/Hypersomnia/blob/master/src/3rdparty/streflop/libm/flt-32/e_sqrtf.cpp)
- Apart from worrying about floats..
- I had to watch out even when iterating ``std::unordered_map`` - often replacing them with deterministically ordered ``std::map``.
- I had to use a [portable RNG (xorshift)](https://github.com/TeamHypersomnia/Hypersomnia/blob/master/src/augs/misc/xorshift.hpp), ditching the entire ``