Home

Awesome

<p align="center"> <a href="https://sourga.me" target="_blank"> <img src="gh-assets/header.png" alt="Sour Cover Image"> </a> </p> <p align="center"> <a href="https://discord.gg/WP3EbYym4M"><img src="https://img.shields.io/discord/1175485543421837455?color=5865F2&label=discord&style=flat-square" alt="Discord" /></a> <a href="https://github.com/cfoust/sour/releases"><img src="https://img.shields.io/github/downloads/cfoust/sour/latest/total?style=flat-square" alt="sour releases" /></a> <a href="https://github.com/cfoust/sour/blob/main/LICENSE"><img src="https://img.shields.io/github/license/cfoust/sour?color=48AC75&style=flat-square" alt="sour License Badge MIT" /></a> </p>

What is this?

Sour is a multiplatform modernization of <a target="_blank" href="http://sauerbraten.org/">Cube 2: Sauerbraten</a> delivered as a single executable (with adjacent assets.) It is a Sauerbraten server that serves a fully-featured web-version of Sauerbraten (with support for mobile devices) in addition to accepting connections from the traditional, desktop version of the game. Sour is the easiest way to play Sauerbraten with your friends.

<a target="_blank" href="https://sourga.me/">Give it a try.</a>

Installation

You can download an archive containing the Sour server and all necessary assets from the releases page. For now, only Linux and macOS are supported.

You can also install Sour via brew:

# Install the latest version:
brew install cfoust/taps/sour

# Or a specific one:
brew install cfoust/taps/sour@0.2.2

Running Sour

To run Sour, extract a release archive anywhere you wish, navigate to that directory, and run ./sour. If you installed Sour with brew, just run sour in any terminal session.

Running sour will start a Sour server accessible to web clients at http://0.0.0.0:1337 and to desktop clients on port 28785. In other words, you should be able to connect to the Sour server in the Sauerbraten desktop client by running /connect localhost.

By serving on 0.0.0.0 by default, the Sour server will be available to other devices on the local network at IP of the device running the Sour server.

Configuration

Sour is highly configurable. When run without arguments, sour defaults to running sour serve with the default Sour configuration. You change Sour's configuration by providing the path to a configuration file to sour serve:

sour serve config.yaml

Sour can be configured using .yaml or .json files; the structure is the same in both cases.

To print the default configuration to standard output, run sour config:

sour config > config.yaml

Sour also supports merging configurations together.

sour serve config_a.yaml some_path/config_b.json config_c.yaml

These configurations are merged from left to right using CUE. CUE merges JSON data by overwriting values (if they're scalar, such as strings, booleans, and numbers) or combining values (if they're arrays). In effect, this means that configurations can specify values for only a subset of properties without problems.

Goals

Architecture

Here is a high level description of the repository's contents:

Contributing

Join us on Discord to chat with us and see how you can help out! Check out the issues tab to get an idea of what needs doing.

Inspiration

Some years ago I came across BananaBread, which was a basic tech demo that used Emscripten to compile Sauerbraten for the web. The project was limited in scope and done at a time when bandwidth was a lot more precious.

License

Each project that was forked into this repository has its own original license intact, though the glue code and subsequent modifications I have made are licensed according to the MIT license specified in LICENSE.