Copy of gameserver with minimal website

This commit is contained in:
DeathByDenim 2023-05-26 16:41:57 -04:00
parent 985a5ea8e7
commit 0ad721b1e0
Signed by: DeathByDenim
GPG Key ID: 4A475283D925365B
105 changed files with 4350 additions and 10 deletions

12
.gitignore vendored
View File

@ -1,9 +1,5 @@
# ---> Jekyll
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
# Ignore folders generated by Bundler
.bundle/
vendor/
website/_sass/bootstrap/
website/_site/
website/_config.yml
web.tar.bz2

View File

@ -1,3 +1,83 @@
# Gameserver
# Game server
The official general gameserver repository for onFOSS events.
This is a collection of scripts to deploy game servers on Debian 11. All game
servers are wrapped in SystemD units and can be controlled by systemctl.
It also comes with a web front end which features the games hosted as well as
their respective download link. It also displays server stats and has an admin
panel for game servers that have interactive shells.
The following games are deployed:
* Armagetron Advanced
* Bzflag
* Hedgewars
* Lix
* Mindustry
* Minetest (Blockbomber mod)
* Odamex
* OpenHV
* OpenSpades
* OpenSoldat
* Shattered Paradise
* SuperTuxKart
* Super Tux Party
* Teeworlds (optionally as DDrace)
* UFO: Alien Invasion
* Unvanquished
* Xonotic (optionally as Battle Royale)
It is based on https://git.libregaming.org/c/onFOSS-LAN-Serverconfiguration
## Installation
The main script is `deploy.sh`. You only need to give if your domain name and your own name.
```
DOMAINNAME=play.jarno.ca HOSTEDBYNAME=DeathByDenim ./deploy.sh
```
This will download all the game servers, install them, configure them, and start them up. It should take less than an hour for all game servers to be up and running.
If you don't have a domainname, just use the IP address.
It also retrieves a certificate for Let's Encrypt for the web interface. If you don't want the certificate, you can also specify `NOSSL=1`. This will also convert all internal links to http, meaning that if you add a certificate later things will break due to modern browser not allowing mixed http/https content.
There is also support for generating just the website without the game server which is useful if you want to host the website somewhere else while your main server is down.
```
DOMAINNAME=play.jarno.ca HOSTEDBYNAME=DeathByDenim ./pack_web_offline.sh
```
The webpage will display "OFFLINE" and not attempt to show the server stats.
The password for the admin panel as well as for game servers that support admin password is stored in `/etc/gameserverpassword`. The username for the admin panel is just `onfoss`.
## Website
The website is generated using Jekyll which uses a config.yml that is generated by the deploy script. Additionally, there is a YAML file called events.yml in the _data directory where events are stored. The formatting is:
```
- date: 2022-12-17T14:00:00UTC
intro: "onFOSS-LAN hosted by DeathByDenim"
games:
- time: "14:00"
title: "Get together"
- time: "14:30"
title: "Doom (ODAMEX) XMAS mod"
- time: "15:15"
title: "Teeworlds"
tournament: true
- time: "16:00"
title: "OpenSpades"
- time: "17:00"
title: "Break"
- time: "18:00"
title: "Lix"
- time: "18:30"
title: "Free Play!"
extras: ["Shattered Paradise"]
```
Each game must have a title and it optionally can have a time as well. The optional field extras lists games that were played as part of a bigger category, in this example the free play section.
Finally, you can also specify tournament which will make this game appear in the tournament page.
## Repository
The main version of this git repository is on [git.libregaming.org](https://git.libregaming.org/DeathByDenim/gameserver). There is a mirror on [Github](https://github.com/DeathByDenim/gameserver)

170
configs/supertuxkart.xml Normal file
View File

@ -0,0 +1,170 @@
<?xml version="1.0"?>
<server-config version="6" >
<!-- Name of server, encode in XML if you want to use unicode characters. -->
<server-name value="STK onFOSS-LAN Server" />
<!-- Port used in server, if you specify 0, it will use the server port specified in stk_config.xml. If you wish to use a random port, set random-server-port to '1' in user config. STK will automatically switch to a random port if the port you specify fails to be bound. -->
<server-port value="0" />
<!-- Game mode in server, 0 is normal race (grand prix), 1 is time trial (grand prix), 3 is normal race, 4 time trial, 6 is soccer, 7 is free-for-all and 8 is capture the flag. Notice: grand prix server doesn't allow for players to join and wait for ongoing game. -->
<server-mode value="3" />
<!-- Difficulty in server, 0 is beginner, 1 is intermediate, 2 is expert and 3 is supertux (the most difficult). -->
<server-difficulty value="3" />
<!-- Number of grand prix tracks per game (If grand prix enabled). -->
<gp-track-count value="3" />
<!-- Use goal target in soccer. -->
<soccer-goal-target value="false" />
<!-- Enable wan server, which requires you to have an stk-addons account with a saved session. Check init-user command for details. -->
<wan-server value="false" />
<!-- Enable network console, which can do for example kickban. -->
<enable-console value="false" />
<!-- Maximum number of players on the server, setting this to a value greater than 8 can cause performance degradation. -->
<server-max-players value="16" />
<!-- Password for private server, leave empty for a public server. -->
<private-server-password value="" />
<!-- Message of today shown in lobby, you can enter encoded XML words here or a file.txt and let STK load it. -->
<motd value="Welcome to onFOSS-LAN" />
<!-- If this value is set to false, the server will ignore chat messages from all players. -->
<chat value="true" />
<!-- If client sends more than chat-consecutive-interval / 2 chats within this value (read in seconds), it will be ignore, negative value to disable. -->
<chat-consecutive-interval value="8" />
<!-- Allow players to vote for which track to play. If this value is set to false, the server will randomly pick the next track to play. -->
<track-voting value="true" />
<!-- Timeout in seconds for selecting karts and (or) voting tracks in server, you may want to use a lower value if you have track-voting off. -->
<voting-timeout value="30" />
<!-- Timeout in seconds for validation of clients in wan, currently STK will use the stk-addons server to share AES key between the client and server. -->
<validation-timeout value="20" />
<!-- By default WAN server will always validate player and LAN will not, disable it to allow non-validated player in WAN. -->
<validating-player value="true" />
<!-- Disable it to turn off all stun related code in server, it allows for saving of server resources if your server is not behind a firewall. -->
<firewalled-server value="true" />
<!-- Enable to allow IPv6 connection if you have a public IPv6 address. STK currently uses dual-stack mode which requires server to have both IPv4 and IPv6 and listen to same port. If STK detects your server has no public IPv6 address or port differs between IPv4 and IPv6 then it will use IPv4 only socket. For system which doesn't support dual-stack socket (like OpenBSD) you may fail to be connected by IPv4 clients. You can override the detection in config.xml at supertuxkart config-0.10 folder, with default-ip-type option. -->
<ipv6-connection value="true" />
<!-- No server owner in lobby which can control the starting of game or kick any players. -->
<owner-less value="false" />
<!-- Time to wait before entering kart selection screen if satisfied min-start-game-players below for owner less or ranked server. -->
<start-game-counter value="60" />
<!-- Clients below this value will be rejected from joining this server. It's determined by number of official karts in client / number of official karts in server -->
<official-karts-threshold value="1" />
<!-- Clients below this value will be rejected from joining this server. It's determined by number of official tracks in client / number of official tracks in server, setting this value too high will prevent android players from joining this server, because STK android apk has some official tracks removed. -->
<official-tracks-threshold value="0.7" />
<!-- Only auto start kart selection when number of connected player is larger than or equals this value, for owner less or ranked server, after start-game-counter reaches 0. -->
<min-start-game-players value="2" />
<!-- Automatically end linear race game after 1st player finished for some time (currently his finished time * 0.25 + 15.0). -->
<auto-end value="false" />
<!-- Enable team choosing in lobby in team game (soccer and CTF). If owner-less is enabled and live-spectate is not enabled, than this option is always disabled. -->
<team-choosing value="true" />
<!-- If strict-players is on, no duplicated online id or split screen players are allowed, which can prevent someone using more than 1 network AI with this server. -->
<strict-players value="false" />
<!-- Server will submit ranking to stk-addons server for linear race games, you require permission for that. validating-player, auto-end, strict-player and owner-less will be turned on. -->
<ranked value="false" />
<!-- If true, the server owner can config the difficulty and game mode in the GUI of lobby. This option cannot be used with owner-less or grand prix server, and will be automatically turned on if the server was created using the in-game GUI. The changed difficulty and game mode will not be saved in this config file. -->
<server-configurable value="true" />
<!-- If true, players can live join or spectate the in-progress game. Currently live joining is only available if the current game mode used in server is FFA, CTF or soccer, also official-karts-threshold will be made 1.0. If false addon karts will use their original hitbox other than tux, all players having it restriction applies. -->
<live-spectate value="true" />
<!-- Time in seconds when a flag is dropped a by player in CTF returning to its own base. -->
<flag-return-timeout value="20" />
<!-- Time in seconds to deactivate a flag when it's captured or returned to own base by players. -->
<flag-deactivated-time value="3" />
<!-- Hit limit of free for all, zero to disable hit limit. -->
<hit-limit value="20" />
<!-- Time limit of free for all in seconds, zero to disable time limit. -->
<time-limit-ffa value="360" />
<!-- Capture limit of CTF, zero to disable capture limit. -->
<capture-limit value="5" />
<!-- Time limit of CTF in seconds, zero to disable time limit. -->
<time-limit-ctf value="600" />
<!-- Value used by server to automatically estimate each game time. For races, it decides the lap of each race in network game, if more than 0.0f, the number of lap of each track vote in linear race will be determined by max(1.0f, auto-game-time-ratio * default lap of that track). For soccer if more than 0.0f, for time limit game it will be auto-game-time-ratio * soccer-time-limit in UserConfig, for goal limit game it will be auto-game-time-ratio * numgoals in UserConfig, -1 to disable for all. -->
<auto-game-time-ratio value="-1" />
<!-- Maximum ping allowed for a player (in ms), it's recommended to use default value if live-spectate is on. -->
<max-ping value="300" />
<!-- Tolerance of jitter in network allowed (in ms), it's recommended to use default value if live-spectate is on. -->
<jitter-tolerance value="100" />
<!-- Kick players whose ping is above max-ping. -->
<kick-high-ping-players value="false" />
<!-- Allow players exceeding max-ping to have a playable game, if enabled kick-high-ping-players will be disabled, please also use a default value for max-ping and jitter-tolerance with it. -->
<high-ping-workaround value="true" />
<!-- Kick idle player which has no network activity to server for more than some seconds during game, unless he has finished the race. Negative value to disable, and this option will always be disabled for LAN server. -->
<kick-idle-player-seconds value="60" />
<!-- Set how many states the server will send per second, the higher this value, the more bandwidth requires, also each client will trigger more rewind, which clients with slow device may have problem playing this server, use the default value is recommended. -->
<state-frequency value="10" />
<!-- Use sql database for handling server stats and maintenance, STK needs to be compiled with sqlite3 supported. -->
<sql-management value="false" />
<!-- Database filename for sqlite to use, it can be shared for all servers created in this machine, and STK will create specific table for each server. You need to create the database yourself first, see NETWORKING.md for details -->
<database-file value="stkservers.db" />
<!-- Specified in millisecond for maximum time waiting in sqlite3_busy_handler. You may need a higher value if your database is shared by many servers or having a slow hard disk. -->
<database-timeout value="1000" />
<!-- IPv4 ban list table name, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. STK can auto kick active peer from ban list (update per minute) whichallows live kicking peer by inserting record to database. -->
<ip-ban-table value="ip_ban" />
<!-- IPv6 ban list table name, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. STK can auto kick active peer from ban list (update per minute) which allows live kicking peer by inserting record to database. -->
<ipv6-ban-table value="ipv6_ban" />
<!-- Online ID ban list table name, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. STK can auto kick active peer from ban list (update per minute) which allows live kicking peer by inserting record to database. -->
<online-id-ban-table value="online_id_ban" />
<!-- Player reports table name, which will be written when a player reports player in the network user dialog, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. -->
<player-reports-table value="player_reports" />
<!-- Days to keep player reports, older than that will be auto cleared, 0 to keep them forever. -->
<player-reports-expired-days value="3" />
<!-- IP geolocation table, you only need this table if you want to geolocate IP from non-stk-addons connection, as all validated players connecting from stk-addons will provide the location info, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. -->
<ip-geolocation-table value="ip_mapping" />
<!-- IPv6 geolocation table, you only need this table if you want to geolocate IP from non-stk-addons connection, as all validated players connecting from stk-addons will provide the location info, you need to create the table first, see NETWORKING.md for details, empty to disable. This table can be shared for all servers if you use the same name. -->
<ipv6-geolocation-table value="ipv6_mapping" />
<!-- If true this server will auto add / remove AI connected with network-ai=x, which will kick N - 1 bot(s) where N is the number of human players. Only use this for non-GP racing server. -->
<ai-handling value="false" />
<!-- If true this server will allow AI instance to be connected from anywhere. (other than LAN network only) -->
<ai-anywhere value="false" />
</server-config>

156
deploy.sh Executable file
View File

@ -0,0 +1,156 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
### Deploy script for a game server running multiple open-source game servers
### This script is intended for Debian 11, but may work on other apt-based
### systems too
###
### Specify domain name:
### DOMAINNAME=example.com HOSTEDBYNAME=DeathByDenim ./deploy.sh
set -e
if [ -z $DOMAINNAME ]; then
echo "Domain name was not set. Please export DOMAINNAME first"
exit 1
fi
if [ -z $HOSTEDBYNAME ]; then
echo "Hosted-by name was not set. Please export HOSTEDBYNAME first"
exit 1
fi
export stk_version="latest"
export bzflag_version="2.4"
export mindustry_version="latest"
export odamex_version="latest"
export openhv_version="latest"
export teeworlds_version="latest"
export teeworldsddrace_version="16.1"
export unvanquished_version="latest"
export xonotic_version="0.8.5"
export lix_version="latest"
export shatteredparadise_version="latest"
export systemuser="onfoss"
export letsencryptemail="jarno@jarno.ca"
# Store the randomly generated password. This is used for the web interface
# as well as for admin access for the game servers
if [ -f /etc/gameserverpassword ]; then
export systempassword=$(cat /etc/gameserverpassword)
else
export systempassword="$(< /dev/urandom tr -dc a-z | head -c${1:-8};echo;)"
echo "$systempassword" > /etc/gameserverpassword
chmod go= /etc/gameserverpassword
fi
# Install what we need
apt update -y && apt full-upgrade -y
apt install --assume-yes \
git tmux unzip curl vim openjdk-11-jdk xz-utils python3-venv python3-pip \
python3-dev apt virtualenv python3-virtualenv libjpeg-dev zlib1g-dev \
fuse g++ gcc curl firewalld automake autoconf libtool \
libcurl3-dev libc-ares-dev zlib1g-dev libncurses-dev make python3-aiohttp \
nginx-core certbot python3-certbot-nginx sudo python3-psutil \
ldc dub libenet-dev python3-bcrypt jq telnet jekyll ruby-jekyll-feed
# Create the user for running the game servers
if ! getent passwd ${systemuser}; then
useradd ${systemuser} --system --create-home --shell=/bin/false
fi
export systemuserhome="$( getent passwd "${systemuser}" | cut -d: -f6 )"
# Install the web interface for servers that require interactive shells
if [ -d console2web ]; then
cd console2web
git pull
cd -
else
git clone https://github.com/DeathByDenim/console2web.git
fi
cp console2web/console2web.py /usr/bin/console2web
# Deploy web interface stuff
"$(dirname "$0")"/scripts/deploy_monitoring.sh
"$(dirname "$0")"/scripts/deploy_webserver.sh
# Deploy the game servers
games="\
supertuxkart \
bzflag \
hedgewars \
lix \
mindustry \
minetest \
odamex \
openhv \
openspades \
teeworlds \
teeworlds-ddrace \
unvanquished \
xonotic \
xonotic-br \
armagetron_advanced \
opensoldat \
supertuxparty \
ufoai \
shatteredparadise"
failed_games=""
for game in $games; do
if ! "$(dirname "$0")"/scripts/deploy_${game}.sh; then
failed_games+="${game}\n"
fi
done
# Apply all pending firewall rules. NGINX shouldn't have to be restarted, but it seems to help.
firewall-cmd --reload
systemctl restart nginx
echo
echo "Installation complete. Password is ${systempassword}"
if [ -n "$failed_games" ]; then
echo "The following games failed to install:"
echo -e "$failed_games"
echo
echo "Use /usr/local/bin/redeploy.sh [game] to try again"
fi
cat > /usr/local/bin/redeploy.sh <<EOF
#!/bin/bash
export stk_version="latest"
export bzflag_version="2.4"
export mindustry_version="latest"
export odamex_version="latest"
export openhv_version="latest"
export teeworlds_version="latest"
export teeworldsddrace_version="16.1"
export unvanquished_version="latest"
export xonotic_version="0.8.5"
export lix_version="latest"
export shatteredparadise_version="latest"
export systemuser="onfoss"
export letsencryptemail="jarno@jarno.ca"
export DOMAINNAME="$DOMAINNAME"
export HOSTEDBYNAME="$HOSTEDBYNAME"
export systempassword="$systempassword"
export systemuserhome="$systemuserhome"
"$(dirname "$(realpath -s "$0")")"/scripts/deploy_\${1}.sh
EOF
chmod +x /usr/local/bin/redeploy.sh

77
pack_web_offline.sh Executable file
View File

@ -0,0 +1,77 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
### Package a version of the website for offline use on a different web server.
### Used to indicate that the VM running the game servers is off.
### Specify domain name:
### DOMAINNAME=example.com HOSTEDBYNAME=DeathByDenim ./pack_web_offline.sh
set -e
if ! which jekyll > /dev/null; then
echo "Jekyll is required to generate the website"
exit 1
fi
webroot=${TMPDIR:-/tmp}/website
mkdir -p ${webroot}
cp -r "$(dirname "$0")"/website/* ${webroot}
curl --location https://github.com/twbs/bootstrap/archive/v5.2.3.zip > ${TMPDIR:-/tmp}/bootstrap.zip
unzip -o -d ${TMPDIR:-/tmp}/bootstrap ${TMPDIR:-/tmp}/bootstrap.zip "bootstrap-5.2.3/scss/*"
if [ -d "$(dirname "$0")"/../website/_sass/bootstrap ]; then
rm -r "$(dirname "$0")"/../website/_sass/bootstrap
fi
mv ${TMPDIR:-/tmp}/bootstrap/bootstrap-5.2.3/scss ${webroot}/_sass/bootstrap
rm -r ${TMPDIR:-/tmp}/bootstrap.zip ${TMPDIR:-/tmp}/bootstrap
if [ x"$NOSSL" = "x" ] || [ $NOSSL -ne 1 ]; then
ssl="true"
s_for_https="s"
else
ssl="false"
s_for_https=""
fi
cat > ${webroot}/_config.yml <<EOF
title: "onFOSS"
description: >
onFOSS-LAN is a online, "Free (as Freedom) and Open Source" LAN-Party hosted by ${HOSTEDBYNAME} The goal is to get people together, enjoying the art of computer games and having a great time in these days. The FOSS community is a place of being open minded and acceptance to all different kinds of people with the focus of fully transparent systems and protecting individuals. So it does not matter if you are on Windows, Mac or Linux and it is also NOT necessary to have a PC MASTERRACE setup to run those games.
url: http${s_for_https}://${DOMAINNAME}
content:
hosted_by_name: "${HOSTEDBYNAME}"
domain_name: "${DOMAINNAME}"
offline: true
ssl: ${ssl}
md5password: "$(echo -n "${systempassword}" | md5sum | cut -d' ' -f1)"
defaults:
-
scope:
path: ""
type: "posts"
values:
layout: "post"
plugins:
- jekyll-feed
EOF
jekyll build --source ${webroot} --destination ${webroot}/_site
tar -cjf web.tar.bz2 --directory="${webroot}/_site" .
rm -rf "${webroot}"

View File

@ -0,0 +1,57 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /lib/systemd/system/armagetronad-dedicated.service ]; then
systemctl stop armagetronad-dedicated
fi
apt install --assume-yes armagetronad-dedicated
# Override unit file to use console2web
mkdir -p /etc/systemd/system/armagetronad-dedicated.service.d
cat > /etc/systemd/system/armagetronad-dedicated.service.d/override.conf <<EOF
[Service]
ExecStart=
ExecStart=/usr/bin/console2web -a "${systempassword}" -p 62551 /usr/games/armagetronad-dedicated.real --datadir /usr/share/games/armagetronad --configdir /etc/armagetronad --userdatadir /var/games/armagetronad
EOF
systemctl daemon-reload
cat > /etc/armagetronad/server_info.cfg <<EOF
MESSAGE_OF_DAY Welcome to onFOSS-LAN\\nTry to survive as long as possible!\\nNote that you can brake by pressing the down arrow key\\nHugging walls will give you a speed boost\\n\\nPress <Enter> to start!
SERVER_NAME onFOSS-LAN
EOF
cat > /etc/armagetronad/settings_custom.cfg <<EOF
TALK_TO_MASTER 0
EOF
systemctl restart armagetronad-dedicated.service
cat > /etc/nginx/gameserver.d/armagetron.conf <<EOF
location /armagetron {
proxy_pass http://localhost:62551/;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host \$host;
}
EOF
# Add firewall rules
firewall-cmd --zone=public --add-port=4534/udp --permanent

94
scripts/deploy_bzflag.sh Executable file
View File

@ -0,0 +1,94 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/bzflag.service ]; then
systemctl stop bzflag
fi
apt-get -y install build-essential pkg-config
# Install BZFlag
mkdir -p ${TMPDIR:-/tmp}/bzflag-build
cd ${TMPDIR:-/tmp}/bzflag-build
if [ -d bzflag ]; then
rm -rf bzflag
fi
git clone --branch ${bzflag_version} https://github.com/BZFlag-Dev/bzflag.git
cd bzflag
./autogen.sh
./configure --disable-client --prefix=/opt/bzflag-${bzflag_version}
make
make install
if ! [ -L /usr/games/bzfs ]; then
ln -s /opt/bzflag-${bzflag_version}/bin/bzfs /usr/games/
fi
if ! [ -L /usr/games/bzadmin ]; then
ln -s /opt/bzflag-${bzflag_version}/bin/bzadmin /usr/games/
fi
rm -rf ${TMPDIR:-/tmp}/bzflag-build
# Create SystemD unit
cat > /etc/systemd/system/bzflag.service <<EOF
[Unit]
Description=BZFlag server
After=network.target
Requires=bzflag-monitor.service
[Service]
ExecStart=/usr/games/bzfs -ms 5 -j -t +r +f SW +f SB{2} +f GM +f ST{3} -d -d -d -passwd "${systempassword}"
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
# Create SystemD unit
cat > /etc/systemd/system/bzflag-monitor.service <<EOF
[Unit]
Description=BZFlag server monitor
After=bzflag.service
Requires=bzflag.service
[Service]
ExecStart=/usr/bin/console2web -a "${systempassword}" -p 62553 /usr/games/bzadmin admin@localhost -ui stdboth "/password ${systempassword}"
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now bzflag.service
cat > /etc/nginx/gameserver.d/bzflag.conf <<EOF
location /bzflag {
proxy_pass http://localhost:62553/;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host \$host;
}
EOF
# Add firewall rules
firewall-cmd --zone=public --add-port=5154/tcp --permanent
firewall-cmd --zone=public --add-port=5154-5200/udp --permanent

117
scripts/deploy_cortexcommand.sh Executable file
View File

@ -0,0 +1,117 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/cortexcommand.service ]; then
systemctl stop cortexcommand
fi
apt-get -y install build-essential libsdl2-dev libloadpng4-dev libflac++-dev luajit-5.1-dev liblua5.1-dev libminizip-dev liblz4-dev libpng++-dev libtbb-dev ninja-build xvfb
# Install Cortex Command
mkdir -p ${TMPDIR:-/tmp}/cortexcommand-build
cd ${TMPDIR:-/tmp}/cortexcommand-build
if [ -d cortexcommand ]; then
rm -rf cortexcommand
fi
git clone --depth=1 https://github.com/cortex-command-community/Cortex-Command-Community-Project-Source.git
git clone --depth=1 https://github.com/cortex-command-community/Cortex-Command-Community-Project-Data.git
cd Cortex-Command-Community-Project-Source
virtualenv mesonenv
pip install meson
source mesonenv/bin/activate
meson setup --prefix=/opt/cortexcommand --buildtype=debug build
ninja -C build
ninja install -C build
deactivate
cd ..
rm -rf ${TMPDIR:-/tmp}/cortexcommand-build
# Patch startup script to get rid of weird directories
cd /opt/cortexcommand/bin
patch -l <<EOF
--- CortexCommand 2023-04-27 21:46:03.667870056 -0400
+++ CortexCommand 2023-04-27 21:46:32.457638889 -0400
@@ -10,7 +10,7 @@
link_user_files() {
local user_files=("LogConsole.txt" "LogLoading.txt" "LogLoadingWarning.txt" "AbortScreen.bmp" "AbortScreen.png" "Settings.ini")
- local user_directories=("Metagames.rte" "Scenes.rte" "_ScreenShots")
+ local user_directories=("_ScreenShots")
if ! [[ -d "\${user_data}" ]]; then
mkdir -p "\${user_data}"
@@ -20,16 +20,6 @@
ln -s "\${user_data}/\$file" \$tmp_dir
done
- if ! [[ -d "\${user_data}/Metagames.rte" ]]; then
- mkdir -p "\${user_data}/Metagames.rte"
- echo -e "DataModule\n\tModuleName = Metagame Saves" > "\${user_data}/Metagames.rte/Index.ini"
- fi
-
- if ! [[ -d "\${user_data}/Scenes.rte" ]]; then
- mkdir -p "\${user_data}/Scenes.rte"
- echo -e "DataModule\n\tModuleName = Saves" > "\${user_data}/Scenes.rte/Index.ini"
- fi
-
for directory in \${user_directories[@]}; do
if ! [[ -d "\${user_data}/\${directory}" ]]; then
mkdir -p "\${user_data}/\${directory}"
EOF
sudo -u ${systemuser} mkdir -p "${systemuserhome}/.local/share/Cortex Command"
echo -e "ServerSleepWhenIdle = 1\nServerSimSleepWhenIdle = 1" | sudo -u ${systemuser} tee "${systemuserhome}/.local/share/Cortex Command/Settings.ini"
# Create SystemD unit
cat > /etc/systemd/system/cortexcommand.service <<EOF
[Unit]
Description=Cortex Command server
After=network.target cortexcommand-fakex.service
BindsTo=cortexcommand-fakex.service
[Service]
Environment="DISPLAY=:100"
ExecStart=/opt/cortexcommand/bin/CortexCommand -server
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
cat > /etc/systemd/system/cortexcommand-fakex.service <<EOF
[Unit]
Description=Fake X server for Cortex Command server
BindsTo=cortexcommand.service
[Service]
ExecStart=/usr/bin/Xvfb :100
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now cortexcommand.service
# Add firewall rules
firewall-cmd --zone=public --add-port=8000/udp --permanent

46
scripts/deploy_hedgewars.sh Executable file
View File

@ -0,0 +1,46 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
apt install --assume-yes hedgewars
if [ -e /etc/systemd/system/hedgewars.service ]; then
systemctl stop hedgewars
fi
# Hedgewars
# Create SystemD unit
cat > /etc/systemd/system/hedgewars.service <<EOF
[Unit]
Description=Hedgewars server
After=network-online.target
[Service]
ExecStart=/usr/lib/hedgewars/bin/hedgewars-server
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now hedgewars.service
# Add firewall rules
firewall-cmd --zone=public --add-port=46631/tcp --permanent

60
scripts/deploy_lix.sh Executable file
View File

@ -0,0 +1,60 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/lix.service ]; then
systemctl stop lix
fi
if [ -z ${lix_version} ] || [ "${lix_version}" = "latest" ]; then
lix_version=$(curl -s https://api.github.com/repos/SimonN/LixD/releases/latest | jq -r '.["tag_name"]' | cut -c2-)
fi
# Install Lix
mkdir -p ${TMPDIR:-/tmp}/lix-build
cd ${TMPDIR:-/tmp}/lix-build
if [ -d LixD ]; then
rm -rf LixD
fi
git clone --branch v${lix_version} https://github.com/SimonN/LixD.git
cd LixD/src/server
dub build
mkdir -p /opt/lix-${lix_version}
cp ../../bin/lixserv /opt/lix-${lix_version}
rm -rf ${TMPDIR:-/tmp}/lix-build
# Create SystemD unit
cat > /etc/systemd/system/lix.service <<EOF
[Unit]
Description=Lix server
After=network.target
[Service]
ExecStart=/opt/lix-${lix_version}/lixserv
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now lix.service
# Add firewall rules
firewall-cmd --zone=public --add-port=22934/udp --permanent

63
scripts/deploy_mindustry.sh Executable file
View File

@ -0,0 +1,63 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/mindustry.service ]; then
systemctl stop mindustry
fi
if [ -z ${mindustry_version} ] || [ "${mindustry_version}" = "latest" ]; then
mindustry_version=$(curl -s https://api.github.com/repos/Anuken/Mindustry/releases?per_page=1 | jq -r '.[0]["tag_name"]' | cut -c2-)
fi
# Mindustry
mkdir -p /opt/mindustry-${mindustry_version}
curl --location https://github.com/Anuken/Mindustry/releases/download/v${mindustry_version}/server-release.jar > /opt/mindustry-${mindustry_version}/mindustry.jar
mkdir -p /var/lib/mindustry
chown -R ${systemuser} /var/lib/mindustry
cat > /etc/systemd/system/mindustry.service <<EOF
[Unit]
Description=Mindustry server
After=network.target
[Service]
WorkingDirectory=/var/lib/mindustry
ExecStart=/usr/bin/console2web -a "${systempassword}" -p 62548 /usr/lib/jvm/java-11-openjdk-amd64/bin/java -jar /opt/mindustry-${mindustry_version}/mindustry.jar "config autosave true","config autosaveSpacing 120","host"
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now mindustry.service
cat > /etc/nginx/gameserver.d/mindustry.conf <<EOF
location /mindustry {
proxy_pass http://localhost:62548/;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host \$host;
}
EOF
firewall-cmd --zone=public --add-port=6567/tcp --permanent
firewall-cmd --zone=public --add-port=6567/udp --permanent

75
scripts/deploy_minetest.sh Executable file
View File

@ -0,0 +1,75 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
apt install --assume-yes libsqlite3-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev cmake
if [ -e /etc/systemd/system/minetest.service ]; then
systemctl stop minetest
fi
if [ -z ${minetest_version} ] || [ "${minetest_version}" = "latest" ]; then
minetest_version=$(curl -s https://api.github.com/repos/minetest/minetest/releases/latest | jq -r '.["tag_name"]')
fi
# Install minetest
mkdir -p ${TMPDIR:-/tmp}/minetest-build
curl --location "https://github.com/minetest/minetest/archive/refs/tags/${minetest_version}.tar.gz" | tar --extract --gzip --no-same-owner --directory=${TMPDIR:-/tmp}/minetest-build
mkdir -p ${TMPDIR:-/tmp}/minetest-build/minetest-${minetest_version}/build
git clone --depth 1 https://github.com/minetest/minetest_game.git ${TMPDIR:-/tmp}/minetest-build/minetest-${minetest_version}/games/minetest_game
git clone --depth 1 --branch "1.9.0mt10" https://github.com/minetest/irrlicht.git ${TMPDIR:-/tmp}/minetest-build/minetest-${minetest_version}/lib/irrlichtmt
cd ${TMPDIR:-/tmp}/minetest-build/minetest-${minetest_version}/build
cmake -DCMAKE_INSTALL_PREFIX=/opt/minetest-${minetest_version} -DBUILD_CLIENT=FALSE -DBUILD_SERVER=TRUE ..
make
make install
cd -
rm -rf ${TMPDIR:-/tmp}/minetest-build
sudo -u ${systemuser} mkdir -p /home/${systemuser}/.minetest/games
curl --location https://content.minetest.net/packages/MisterE/blockbomber/releases/11576/download/ > ${TMPDIR:-/tmp}/blockbomber.zip
sudo -u ${systemuser} unzip -o -d /home/${systemuser}/.minetest/games "${TMPDIR:-/tmp}"/blockbomber.zip
rm -f "${TMPDIR:-/tmp}/blockbomber.zip"
cat > /etc/systemd/system/minetest.service <<EOF
[Unit]
Description=Minetest server
After=network.target
[Service]
ExecStart=/opt/minetest-${minetest_version}/bin/minetestserver --config /etc/minetest.conf --gameid blockbomber
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
cat > /etc/minetest.conf <<EOF
server_name = onFOSS LAN server
server_address = ${DOMAINNAME}
server_announce = false
max_users = 32
enable_split_login_register = false
ipv6_server = true
EOF
systemctl daemon-reload
systemctl enable --now minetest.service
# Add firewall rules
firewall-cmd --zone=public --add-port=30000/udp --permanent

37
scripts/deploy_monitoring.sh Executable file
View File

@ -0,0 +1,37 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
git clone https://github.com/DeathByDenim/d3-serverstats.git
cd d3-serverstats
cp serverstats.py /usr/bin/
cat > /etc/systemd/system/serverstats.service <<EOF
[Unit]
Description=Server monitoring
After=network.target
[Service]
ExecStart=/usr/bin/serverstats.py
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now serverstats

117
scripts/deploy_odamex.sh Executable file
View File

@ -0,0 +1,117 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/odamex.service ]; then
systemctl stop odamex
fi
if [ -z ${odamex_version} ] || [ "${odamex_version}" = "latest" ]; then
odamex_version=$(curl -s https://api.github.com/repos/odamex/odamex/releases/latest | jq -r '.["tag_name"]')
fi
# Install ODAMEX
apt install --assume-yes libsdl2-dev libsdl2-mixer-dev cmake deutex freedoom libpng-dev
mkdir -p ${TMPDIR:-/tmp}/odamex-build
curl --location https://github.com/odamex/odamex/releases/download/${odamex_version}/odamex-src-${odamex_version}.tar.gz | tar --extract --gz --no-same-owner --directory="${TMPDIR:-/tmp}/odamex-build"
mkdir ${TMPDIR:-/tmp}/odamex-build/odamex-src-${odamex_version}/build
cd ${TMPDIR:-/tmp}/odamex-build/odamex-src-${odamex_version}/build
cmake -DBUILD_CLIENT=OFF -DBUILD_SERVER=ON -DBUILD_LAUNCHER=OFF -DCMAKE_INSTALL_PREFIX=/opt/odamex-${odamex_version} ..
make
make install
# Build AppImage
mkdir -p AppDir
cmake -DBUILD_CLIENT=ON -DBUILD_SERVER=OFF -DBUILD_LAUNCHER=OFF -DCMAKE_INSTALL_PREFIX=AppDir ..
make
make install
curl -O --location 'https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage'
curl -O --location 'https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage'
chmod +x linuxdeploy-plugin-appimage-x86_64.AppImage linuxdeploy-x86_64.AppImage
mkdir -p AppDir/usr/share/applications
cat > AppDir/usr/share/applications/odamex.desktop <<EOF
[Desktop Entry]
Type=Application
Categories=Game
Name=Odamex
Exec=odamex
Icon=odamex
StartupNotify=false
Terminal=false
EOF
for f in ../media/icon_odamex_*.png; do
resolution=$(echo $f | sed s/"..\/media\/icon_odamex_\([0-9]*\).png"/\\1/g)
mkdir -p AppDir/usr/share/icons/hicolor/${resolution}x${resolution}/apps/
cp $f AppDir/usr/share/icons/hicolor/${resolution}x${resolution}/apps/odamex.png
done
cat > AppDir/AppRun <<EOF
#!/bin/bash
export DOOMWADPATH=\$APPDIR/share/odamex/
\$APPDIR/bin/odamex \$@
EOF
chmod +x AppDir/AppRun
./linuxdeploy-x86_64.AppImage --appdir AppDir --output=appimage
cp Odamex-x86_64.AppImage /var/www/html/assets
cd -
rm -rf ${TMPDIR:-/tmp}/odamex-build
proto="http"
if [ x"$NOSSL" = "x" ] || [ $NOSSL -ne 1 ]; then
proto="https"
fi
mkdir -p /home/${systemuser}/.odamex/
cat > /home/${systemuser}/.odamex/odasrv.cfg <<EOF
set sv_hostname "OnFOSS LAN"
set sv_motd "Welcome to OnFOSS LAN DOOM server"
set sv_website "${proto}://${DOMAINNAME}/"
set sv_downloadsites "${proto}://${DOMAINNAME}/wads/"
set rcon_password "${systempassword}"
set sv_gametype "0"
set sv_skill "3"
set sv_maxplayers "32"
set sv_monstersrespawn 120
set sv_warmup 1
set sv_countdown 5
EOF
chown -R ${systemuser}: /home/${systemuser}/.odamex/
# Create SystemD unit
cat > /etc/systemd/system/odamex.service <<EOF
[Unit]
Description=ODAMEX server
After=network.target
[Service]
ExecStart=/opt/odamex-${odamex_version}/bin/odasrv
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
# Make wads available for download
mkdir -p /var/www/html/wads
cp -r /usr/share/games/doom/freedoom?.wad /var/www/html/wads
systemctl daemon-reload
systemctl enable --now odamex.service
# Add firewall rules
firewall-cmd --zone=public --add-port=10666/udp --permanent

51
scripts/deploy_openhv.sh Executable file
View File

@ -0,0 +1,51 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/openhv.service ]; then
systemctl stop openhv
fi
if [ -z ${openhv_version} ] || [ "${openhv_version}" = "latest" ]; then
openhv_version=$(curl -s https://api.github.com/repos/OpenHV/OpenHV/releases/latest | jq -r '.["tag_name"]')
fi
# Install OpenHV
mkdir -p /opt/openhv-${openhv_version}
curl --location "https://github.com/OpenHV/OpenHV/releases/download/${openhv_version}/OpenHV-${openhv_version}-x86_64.AppImage" > /opt/openhv-${openhv_version}/OpenHV-x86_64.AppImage
chmod +x /opt/openhv-${openhv_version}/OpenHV-x86_64.AppImage
cat > /etc/systemd/system/openhv.service <<EOF
[Unit]
Description=OpenHV server
After=network.target
[Service]
ExecStart=/opt/openhv-${openhv_version}/OpenHV-x86_64.AppImage --server Server.Name="OnFOSS" Server.ListenPort=1234 Server.AdvertiseOnline=False
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now openhv.service
# Add firewall rules
firewall-cmd --zone=public --add-port=1234/tcp --permanent

232
scripts/deploy_opensoldat.sh Executable file
View File

@ -0,0 +1,232 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/opensoldat.service ]; then
systemctl stop opensoldat
fi
# Install dependencies
sudo apt-get -y install build-essential g++ cmake git fpc libprotobuf-dev protobuf-compiler libssl-dev libsdl2-dev libopenal-dev libphysfs-dev libfreetype6
# Install BZFlag
builddir=${TMPDIR:-/tmp}/opensoldat-build
mkdir -p ${builddir}
cd ${builddir}
if [ -d opensoldat ]; then
rm -rf opensoldat
fi
git clone https://github.com/opensoldat/opensoldat.git
git clone https://github.com/opensoldat/base.git
cd opensoldat
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/opensoldat -DBUILD_CLIENT=False ..
make
make install
mkdir -p /opt/opensoldat/bin/configs /opt/opensoldat/bin/logs
cp -r ${builddir}/base/server/configs/bots /opt/opensoldat/bin/configs/bots
if ! [ -L /usr/games/opensoldatserver ]; then
ln -s /opt/opensoldat/bin/opensoldatserver /usr/games/
fi
rm -rf ${builddir}
cat > /opt/opensoldat/bin/configs/server_dm.cfg <<EOF
sv_hostname "onFOSS LAN"
bots_random_alpha 0
sv_gamemode 0
sv_greeting "Welcome to the onFOSS LAN server"
sv_website ${DOMAINNAME}
bots_chat false
EOF
cat > /opt/opensoldat/bin/configs/server_ctf.cfg <<EOF
sv_hostname "onFOSS LAN"
bots_random_alpha 0
sv_gamemode 3
sv_greeting "Welcome to the onFOSS LAN server"
sv_website ${DOMAINNAME}
bots_chat false
sv_maplist "mapslist_ctf.txt"
EOF
if ! [ -L /opt/opensoldat/bin/configs/server.cfg ]; then
ln -s ./server_dm.cfg /opt/opensoldat/bin/configs/server.cfg
fi
cat > /opt/opensoldat/bin/configs/mapslist.txt <<EOF
Aero
Airpirates
Arena2
Arena3
Arena
Bigfalls
Blox
Bridge
Bunker
Cambodia
CrackedBoot
Daybreak
DesertWind
Factory
Flashback
HH
Island2k5
Jungle
Krab
Lagrange
Leaf
MrSnowman
RatCave
Rok
RR
Shau
Tropiccave
Unlim
Veoto
EOF
cat > /opt/opensoldat/bin/configs/mapslist_ctf.txt <<EOF
ctf_Aftermath
ctf_Amnesia
ctf_Ash
ctf_B2b
ctf_Blade
ctf_Campeche
ctf_Cobra
ctf_Crucifix
ctf_Death
ctf_Division
ctf_Dropdown
ctf_Equinox
ctf_Guardian
ctf_Hormone
ctf_IceBeam
ctf_Kampf
ctf_Lanubya
ctf_Laos
ctf_Mayapan
ctf_Maya
ctf_MFM
ctf_Nuubia
ctf_Raspberry
ctf_Rotten
ctf_Ruins
ctf_Run
ctf_Scorpion
ctf_Snakebite
ctf_Steel
ctf_Triumph
ctf_Viet
ctf_Voland
ctf_Wretch
ctf_X
EOF
cat > /opt/opensoldat/bin/configs/mapslist_htf.txt <<EOF
htf_Arch
htf_Baire
htf_Boxed
htf_Desert
htf_Dorothy
htf_Dusk
htf_Erbium
htf_Feast
htf_Mossy
htf_Muygen
htf_Niall
htf_Nuclear
htf_Prison
htf_Rubik
htf_Star
htf_Tower
htf_Void
htf_Vortex
htf_Zajacz
EOF
cat > /opt/opensoldat/bin/configs/mapslist_inf.txt <<EOF
inf_Abel
inf_April
inf_Argy
inf_Belltower
inf_Biologic
inf_Changeling
inf_Flute
inf_Fortress
inf_Industrial
inf_Messner
inf_Moonshine
inf_Motheaten
inf_Outpost
inf_Rescue
inf_Rise
inf_Warehouse
inf_Warlock
EOF
chown -R ${systemuser}: /opt/opensoldat/bin/configs /opt/opensoldat/bin/logs
# Create SystemD unit
cat > /etc/systemd/system/opensoldat.service <<EOF
[Unit]
Description=Soldat server
After=network.target
[Service]
ExecStart=/usr/games/opensoldatserver -sv_adminpassword "${systempassword}"
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
cat > /etc/systemd/system/opensoldat-monitor.service <<EOF
[Unit]
Description=Soldat server monitor
After=network.target,opensoldat.service
Requires=opensoldat.service
[Service]
ExecStartPre=/bin/sh -c 'sleep 10'
ExecStart=/usr/bin/console2web -a "${systempassword}" -p 62554 -b "${systempassword}" telnet localhost 23073
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now opensoldat.service opensoldat-monitor.service
cat > /etc/nginx/gameserver.d/opensoldat.conf <<EOF
location /opensoldat {
proxy_pass http://localhost:62554/;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host \$host;
}
EOF
# Add firewall rules
firewall-cmd --zone=public --add-port=23073/udp --permanent
firewall-cmd --zone=public --add-port=23083/tcp --permanent

78
scripts/deploy_openspades.sh Executable file
View File

@ -0,0 +1,78 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/openspades.service ]; then
systemctl stop openspades
fi
# Smallish maps from https://github.com/kinvaris/openspades-maps
## island
## nuketown (broken)
## pinpoint
## Realistic Bridge
## Rocket Island
## Submarine
# OpenSpades
mkdir -p /opt/openspades
if [ -d /opt/openspades/env ]; then
rm -rf /opt/openspades/env
fi
virtualenv -p python3 /opt/openspades/env
source /opt/openspades/env/bin/activate
pip install -U piqueserver
pip install "twisted<21.0.0" # Twisted 22 removed getPage that piqueserver 1.0.0 depends on
pip install "MarkupSafe==2.0.1" # MarkupSafe removed soft_unicode that piqueserver 1.0.0 depends on
sudo -u ${systemuser} /opt/openspades/env/bin/piqueserver --copy-config
sudo -u ${systemuser} sed -i ${systemuserhome}/.config/piqueserver/config.toml \
-e s/"piqueserver instance"/"onFOSS"/ \
-e s/"#admin = \[\"adminpass1\", \"adminpass2\"\]"/"admin = \[\"${systempassword}\"\]"/ \
-e s/"name = \"Blue\""/"name = \"Cyanide\""/ \
-e s/"color = \[ 0, 0, 255\]"/"color = [ 0, 255, 255]"/ \
-e s/"name = \"Green\""/"name = \"Pinkster\""/ \
-e s/"color = \[ 0, 255, 0\]"/"color = [ 255, 0, 255]"/ \
-e s/" \"classicgen\","/" \"smallrandomisland\",\n \"island\",\n \"pinpoint\",\n \"realisticbridge\",\n \"rocketisland\",\n \"submarine\","/ \
-e s/"default_time_limit = \"2hours\""/"default_time_limit = \"20minutes\""/
deactivate
cat > /etc/systemd/system/openspades.service <<EOF
[Unit]
Description=OpenSpades server
After=network.target
[Service]
ExecStart=/opt/openspades/env/bin/piqueserver
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
for map in island pinpoint realisticbridge rocketisland submarine; do
curl "https://raw.githubusercontent.com/kinvaris/openspades-maps/master/${map}.txt" > ${systemuserhome}/.config/piqueserver/maps/${map}.txt
curl "https://raw.githubusercontent.com/kinvaris/openspades-maps/master/${map}.vxl" > ${systemuserhome}/.config/piqueserver/maps/${map}.vxl
done
curl "https://raw.githubusercontent.com/DeathByDenim/openspades-maps/main/smallrandomisland.txt" > ${systemuserhome}/.config/piqueserver/maps/smallrandomisland.txt
systemctl daemon-reload
systemctl enable --now openspades.service
firewall-cmd --zone=public --add-port=32886/tcp --permanent
firewall-cmd --zone=public --add-port=32887/udp --permanent

View File

@ -0,0 +1,51 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/shatteredparadise.service ]; then
systemctl stop shatteredparadise
fi
if [ -z ${shatteredparadise_version} ] || [ "${shatteredparadise_version}" = "latest" ]; then
shatteredparadise_version=$(curl -s https://api.github.com/repos/ABrandau/Shattered-Paradise-SDK/releases/latest | jq -r '.["tag_name"]')
fi
# Install Shattered Paradise
mkdir -p /opt/shatteredparadise-${shatteredparadise_version}
curl --location "https://github.com/ABrandau/Shattered-Paradise-SDK/releases/download/${shatteredparadise_version}/ShatteredParadise-${shatteredparadise_version}-x86_64.AppImage" > /opt/shatteredparadise-${shatteredparadise_version}/ShatteredParadise-x86_64.AppImage
chmod +x /opt/shatteredparadise-${shatteredparadise_version}/ShatteredParadise-x86_64.AppImage
cat > /etc/systemd/system/shatteredparadise.service <<EOF
[Unit]
Description=Shattered Paradise server
After=network.target
[Service]
ExecStart=/opt/shatteredparadise-${shatteredparadise_version}/ShatteredParadise-x86_64.AppImage --server Server.Name="OnFOSS" Server.ListenPort=12340 Server.AdvertiseOnline=False
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now shatteredparadise.service
# Add firewall rules
firewall-cmd --zone=public --add-port=12340/tcp --permanent

59
scripts/deploy_supertuxkart.sh Executable file
View File

@ -0,0 +1,59 @@
#!/bin/sh
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
echo "Installing SuperTuxKart ${stk_version}"
if [ -e /etc/systemd/system/supertuxkart.service ]; then
systemctl stop supertuxkart
fi
if [ -z ${stk_version} ] || [ "${stk_version}" = "latest" ]; then
stk_version=$(curl -s https://api.github.com/repos/supertuxkart/stk-code/releases/latest | jq -r '.["tag_name"]')
fi
# Install SuperTuxKart
stk_dir="/opt/SuperTuxKart-${stk_version}"
mkdir -p ${stk_dir}
curl --location "https://github.com/supertuxkart/stk-code/releases/download/${stk_version}/SuperTuxKart-${stk_version}-linux-x86_64.tar.xz" | tar --extract --xz --no-same-owner --strip-components=1 --directory=${stk_dir}
ln -s ${stk_dir}/bin/supertuxkart /usr/games/supertuxkart
# Configuration
cp $(dirname $0)/../configs/supertuxkart.xml /etc/supertuxkart.xml
# Create SystemD unit
cat > /etc/systemd/system/supertuxkart.service <<EOF
[Unit]
Description=SuperTuxKart server
After=network.target
[Service]
ExecStart=${stk_dir}/run_game.sh --server-config=/etc/supertuxkart.xml --lan-server=onFOSS
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now supertuxkart.service
# Add firewall rules
firewall-cmd --zone=public --add-port=2757/udp --permanent
firewall-cmd --zone=public --add-port=2759/udp --permanent

50
scripts/deploy_supertuxparty.sh Executable file
View File

@ -0,0 +1,50 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/supertuxparty.service ]; then
systemctl stop supertuxparty
fi
# Install Lix
mkdir -p /opt/supertuxparty
curl 'https://supertux.party/download/latest/server.zip' > ${TMPDIR:-/tmp}/server.zip
unzip -o -d /opt/supertuxparty ${TMPDIR:-/tmp}/server.zip
rm ${TMPDIR:-/tmp}/server.zip
# Create SystemD unit
cat > /etc/systemd/system/supertuxparty.service <<EOF
[Unit]
Description=Super Tux Party server
After=network.target
[Service]
WorkingDirectory=/opt/supertuxparty
ExecStart=/opt/supertuxparty/supertuxparty_server
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now supertuxparty.service
# Add firewall rules
firewall-cmd --zone=public --add-port=7634/udp --permanent

View File

@ -0,0 +1,90 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/teeworlds-ddrace.service ]; then
systemctl stop teeworlds
fi
# Teeworlds
teeworldsddrace_directory="/opt/teeworlds-ddrace-${teeworldsddrace_version}"
mkdir -p "${teeworldsddrace_directory}"
# Download is unreliable at times. Retry a few times before failing
retry_count=3
while [ $retry_count -gt 0 ]; do
curl --location "https://ddnet.tw/downloads/DDNet-${teeworldsddrace_version}-linux_x86_64.tar.xz" | tar --extract --xz --no-same-owner --strip-components=1 --directory="${teeworldsddrace_directory}"
if [ $? -eq 0 ]; then
break
fi
sleep 20
(( retry_count-- ))
done
if [ $retry_count -le 0 ]; then
exit 1
fi
retry_count=3
while [ $retry_count -gt 0 ]; do
curl --location "https://maps.ddnet.tw/compilations/novice.zip" > ${TMPDIR:-/tmp}/novice.zip
if [ $? -eq 0 ]; then
break
fi
sleep 20
(( retry_count-- ))
done
if [ $retry_count -le 0 ]; then
exit 1
fi
unzip -o -d "${teeworldsddrace_directory}"/data/maps ${TMPDIR:-/tmp}/novice.zip
for f in "${teeworldsddrace_directory}"/data/maps/novice/maps/*.map; do
if "${teeworldsddrace_directory}"/map_convert_07 "$f" "`echo "$f" | sed s/"maps\/novice\/maps"/"maps7"/g`"; then
cp "$f" "${teeworldsddrace_directory}"/data/maps
fi
done
rm -rf "${teeworldsddrace_directory}"/data/maps/novice
cat > "${teeworldsddrace_directory}"/data/myServerconfig.cfg <<EOF
sv_name onFOSS
sv_map "Multeasymap"
sv_maprotation "4Beginners","4Nubs","Multeasymap"
sv_register 0
sv_rcon_password ${systempassword}
sv_sqlite_file "${systemuserhome}/.local/share/ddnet/ddnet-server.sqlite"
EOF
cat > /etc/systemd/system/teeworlds-ddrace.service <<EOF
[Unit]
Description=Teeworlds DDrace server
After=network.target
Conflicts=teeworlds.service
[Service]
ExecStart=${teeworldsddrace_directory}/DDNet-Server
Restart=on-failure
User=${systemuser}
WorkingDirectory=${teeworldsddrace_directory}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
firewall-cmd --zone=public --add-port=8303/udp --permanent

137
scripts/deploy_teeworlds.sh Executable file
View File

@ -0,0 +1,137 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/teeworlds.service ]; then
systemctl stop teeworlds
fi
if [ -z ${teeworlds_version} ] || [ "${teeworlds_version}" = "latest" ]; then
teeworlds_version=$(curl -s https://api.github.com/repos/teeworlds/teeworlds/releases/latest | jq -r '.["tag_name"]')
fi
# Teeworlds
teeworld_directory="/opt/teeworlds-${teeworlds_version}"
mkdir -p ${teeworld_directory}
curl --location "https://github.com/teeworlds/teeworlds/releases/download/${teeworlds_version}/teeworlds-${teeworlds_version}-linux_x86_64.tar.gz" | tar --extract --gzip --no-same-owner --strip-components=1 --directory="${teeworld_directory}"
cat > /etc/teeworlds.cfg <<EOF
sv_name onFOSS
sv_map dm3
sv_scorelimit 20
sv_timelimit 10
sv_gametype dm
sv_motd "HAVE FUN!\nTo change the gamemode you have to reload or change the map to apply the change.\n\n${DOMAINNAME}"
sv_max_clients 64
sv_player_slots 48
sv_register 0
ec_port 8123
ec_password ${systempassword}
sv_rcon_password ${systempassword}
sv_vote_kick 1
sv_maprotation dm2,dm3,dm6,dm7
add_vote "Restart Round" "restart"
add_vote "Reload Map" "reload"
add_vote "Change Gamemode to DM" "exec /etc/teedm.cfg"
add_vote "Change Gamemode to CTF" "exec /etc/teectf.cfg"
add_vote "Change Gamemode to TDM" "exec /etc/teetdm.cfg"
add_vote "Change Map to ctf1" "change_map ctf1"
add_vote "Change Map to ctf2" "change_map ctf2"
add_vote "Change Map to ctf3" "change_map ctf3"
add_vote "Change Map to ctf4" "change_map ctf4"
add_vote "Change Map to ctf5" "change_map ctf5"
add_vote "Change Map to dm1" "change_map dm1"
add_vote "Change Map to dm2" "change_map dm2"
add_vote "Change Map to dm6" "change_map dm6"
add_vote "Change Map to dm7" "change_map dm7"
add_vote "Change Map to dm8" "change_map dm8"
add_vote "Change Map to dm9" "change_map dm9"
EOF
cat > /etc/teedm.cfg <<EOF
sv_maprotation dm2,dm3,dm6,dm7
sv_map dm3
sv_scorelimit 20
sv_gametype dm
EOF
cat > /etc/teetdm.cfg <<EOF
sv_maprotation dm2,dm3,dm6,dm7
sv_map dm3
sv_scorelimit 20
sv_gametype dm
EOF
cat > /etc/teectf.cfg <<EOF
sv_maprotation ctf2,ctf3,ctf4
sv_map ctf2
sv_scorelimit 400
sv_gametype ctf
EOF
cat > /etc/systemd/system/teeworlds.service <<EOF
[Unit]
Description=Teeworlds server
After=network.target
Conflicts=teeworlds-ddrace.service
Requires=teeworlds-rcon.service
[Service]
ExecStart=${teeworld_directory}/teeworlds_srv -f /etc/teeworlds.cfg
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
cat > /etc/systemd/system/teeworlds-rcon.service <<EOF
[Unit]
Description=Teeworlds server rcon
After=teeworlds.service
Requires=teeworlds.service
Conflicts=teeworlds-ddrace-rcon.service
[Service]
ExecStart=/usr/bin/console2web -a "${systempassword}" -p 62552 -b "${systempassword}" telnet localhost 8123
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now teeworlds.service
cat > /etc/nginx/gameserver.d/teeworlds.conf <<EOF
location /teeworlds {
proxy_pass http://localhost:62552/;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host \$host;
}
EOF
firewall-cmd --zone=public --add-port=8303/udp --permanent

46
scripts/deploy_ufoai.sh Executable file
View File

@ -0,0 +1,46 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /lib/systemd/system/ufoai-server.service ]; then
systemctl stop ufoai-server
fi
apt install --assume-yes ufoai-server
# Bug fix for UFO:AI? WorkingDirectory needs to be set for server
# to be able to read debian_server.cfg
mkdir -p /etc/systemd/system/ufoai-server.service.d
cat > /etc/systemd/system/ufoai-server.service.d/override.conf <<EOF
[Service]
WorkingDirectory=/usr/lib/ufoai-server
EOF
systemctl daemon-reload
cat > /etc/ufoai-server/server.cfg <<EOF
set sv_hostname "onFOSS-LAN"
set sv_maxclients 8
set sv_public 0
set rcon_password "${systempassword}"
set sv_gametype "coop4"
EOF
systemctl restart ufoai-server.service
# Add firewall rules
firewall-cmd --zone=public --add-port=27910/tcp --permanent

86
scripts/deploy_unvanquished.sh Executable file
View File

@ -0,0 +1,86 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/unvanquished.service ]; then
systemctl stop unvanquished
fi
unvanquished_url="https://github.com/Unvanquished/Unvanquished/releases/download/v${unvanquished_version}/unvanquished_${unvanquished_version}.zip"
if [ -z ${unvanquished_version} ] || [ "${unvanquished_version}" = "latest" ]; then
unvanquished_version=$(curl -s https://api.github.com/repos/Unvanquished/Unvanquished/releases/latest | jq -r '.["tag_name"]' | cut -c2-)
unvanquished_url=$(curl -s https://api.github.com/repos/Unvanquished/Unvanquished/releases/latest | jq -r '.assets | .[] | select(.size > 1000) | .browser_download_url')
fi
# Unvanquished
unvanquished_directory="/opt/unvanquished-${unvanquished_version}"
curl --location ${unvanquished_url} > ${TMPDIR:-/tmp}/unvanquished.zip
unzip -o -d ${TMPDIR:-/tmp} ${TMPDIR:-/tmp}/unvanquished.zip
mkdir -p ${unvanquished_directory}/bin ${unvanquished_directory}/share
unzip -o -d ${unvanquished_directory}/bin ${TMPDIR:-/tmp}/unvanquished*/linux-amd64.zip
if [ -d ${unvanquished_directory}/share/pkg ]; then
rm -rf ${unvanquished_directory}/share/pkg
fi
mv ${TMPDIR:-/tmp}/unvanquished*/pkg ${unvanquished_directory}/share
rm -rf ${TMPDIR:-/tmp}/unvanquished*
mkdir -p ${systemuserhome}/unvanquished_home/config
cat > ${systemuserhome}/unvanquished_home/config/unvanquished.cfg <<EOF
set server.private 1
set g_needpass 0
set sv_hostname "^NUnvanquished ^3onFOSS-LAN"
set g_motd "^2get news on ^5${DOMAINNAME}"
set sv_allowdownload 0
set sv_maxclients 24
set timelimit 0
set g_emptyTeamsSkipMapTime 15
set g_teamForceBalance 1
set g_mapConfigs "map"
set g_initialMapRotation rotation1
map yocto
EOF
chown -R ${systemuser}: ${systemuserhome}/unvanquished_home
cat > /etc/systemd/system/unvanquished.service <<EOF
[Unit]
Description=Unvanquished server
After=network.target
[Service]
ExecStart=/usr/bin/console2web -a "${systempassword}" -p 62549 -e quit ${unvanquished_directory}/bin/daemonded -pakpath ${unvanquished_directory}/share/pkg/ -libpath ${unvanquished_directory}/bin/ -homepath \${HOME}/unvanquished_home/ +exec unvanquished.cfg
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now unvanquished.service
cat > /etc/nginx/gameserver.d/unvanquished.conf <<EOF
location /unvanquished {
proxy_pass http://localhost:62549/;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host \$host;
}
EOF
firewall-cmd --zone=public --add-port=27960/udp --permanent

117
scripts/deploy_webserver.sh Executable file
View File

@ -0,0 +1,117 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
# Web dashboard
systemctl enable --now nginx
firewall-cmd --zone=public --add-service=http --permanent
firewall-cmd --zone=public --add-service=https --permanent
firewall-cmd --reload
# Request SSL certificate. This assumes DNS has been set up already
if [ x"$NOSSL" = "x" ] || [ $NOSSL -ne 1 ]; then
ssl="true"
s_for_https="s"
certbot -n --nginx -d ${DOMAINNAME} -d www.${DOMAINNAME} --agree-tos -m "${letsencryptemail}"
else
s_for_https=""
ssl="false"
fi
# Generate the website and put in place
curl --location https://github.com/twbs/bootstrap/archive/v5.2.3.zip > ${TMPDIR:-/tmp}/bootstrap.zip
unzip -o -d ${TMPDIR:-/tmp}/bootstrap ${TMPDIR:-/tmp}/bootstrap.zip "bootstrap-5.2.3/scss/*"
if [ -d "$(dirname "$0")"/../website/_sass/bootstrap ]; then
rm -r "$(dirname "$0")"/../website/_sass/bootstrap
fi
mv ${TMPDIR:-/tmp}/bootstrap/bootstrap-5.2.3/scss "$(dirname "$0")"/../website/_sass/bootstrap
rm -r ${TMPDIR:-/tmp}/bootstrap.zip ${TMPDIR:-/tmp}/bootstrap
cat > "$(dirname "$0")"/../website/_config.yml <<EOF
title: "onFOSS"
description: >
onFOSS-LAN is a online, "Free (as Freedom) and Open Source" LAN-Party hosted by ${HOSTEDBYNAME}. The goal is to get people together, enjoying the art of computer games and having a great time in these days. The FOSS community is a place of being open minded and acceptance to all different kinds of people with the focus of fully transparent systems and protecting individuals. So it does not matter if you are on Windows, Mac or Linux and it is also NOT necessary to have a PC MASTERRACE setup to run those games.
url: http${s_for_https}://${DOMAINNAME}
content:
hosted_by_name: "${HOSTEDBYNAME}"
domain_name: "${DOMAINNAME}"
offline: false
ssl: ${ssl}
md5password: "$(echo -n "${systempassword}" | md5sum | cut -d' ' -f1)"
defaults:
-
scope:
path: ""
type: "posts"
values:
layout: "post"
plugins:
- jekyll-feed
EOF
jekyll build --source "$(dirname "$0")"/../website --destination /var/www/html
# Patch the NGINX configuration for the web sockets
cp /etc/nginx/sites-available/default /etc/nginx/sites-available/default.bak
patch --ignore-whitespace --force /etc/nginx/sites-available/default <<EOF
--- default.bak 2022-02-09 12:00:07.665387879 +0000
+++ default 2022-02-09 12:02:41.083719671 +0000
@@ -16,6 +16,11 @@
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
+map \$http_upgrade \$connection_upgrade {
+ default upgrade;
+ '' close;
+}
+
# Default server configuration
#
server {
@@ -121,6 +126,20 @@
try_files \$uri \$uri/ =404;
}
+ location ^~ /admin {
+ auth_basic "Restricted";
+ auth_basic_user_file /etc/nginx/htpasswd;
+ }
+
+ proxy_connect_timeout 1d;
+ proxy_send_timeout 1d;
+ proxy_read_timeout 1d;
+ include /etc/nginx/gameserver.d/*.conf;
+
+ location /monitoring/ {
+ proxy_pass http://localhost:9000/;
+ }
+
# pass PHP scripts to FastCGI server
#
#location ~ \\.php\$ {
EOF
mkdir -p /etc/nginx/gameserver.d
# Store password
echo -n "${systemuser}:" > /etc/nginx/htpasswd
echo -e "import bcrypt\nprint(bcrypt.hashpw('${systempassword}'.encode('utf8'),bcrypt.gensalt(rounds=10)).decode('utf8'))" | python3 >> /etc/nginx/htpasswd
systemctl restart nginx

88
scripts/deploy_xonotic-br.sh Executable file
View File

@ -0,0 +1,88 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/xonotic-br.service ]; then
systemctl stop xonotic-br
fi
apt install --assume-yes autoconf automake build-essential curl git libtool \
libgmp-dev libjpeg62-turbo-dev libsdl2-dev libxpm-dev xserver-xorg-dev \
zlib1g-dev unzip zip
# Xonotic Battle Royale branch
xonotic_directory="/opt/xonotic-br"
rm -rf ${xonotic_directory}
git clone https://gitlab.com/xonotic/xonotic.git ${xonotic_directory}
cd ${xonotic_directory}
./all update -l best
./all checkout Juhu/battle-royale
./all compile -r dedicated
mkdir -p ${systemuserhome}/xonotic-br/data
chown -R ${systemuser}: ${systemuserhome}/xonotic-br
cat > ${systemuserhome}/xonotic-br/data/server.cfg <<EOF
sv_public 0
hostname "onFOSS"
maxplayers 64
port 26000
log_file "server.log"
g_start_delay 15
g_maplist "implosion glowplant dance geoplanetary xoylent"
g_maplist_shuffle 1
gametype br
rcon_password "onFOSS"
bot_number 4
skill 8
minplayers 4
bot_prefix [BOT]
g_maplist_votable 6
sv_weaponstats_file http://www.xonotic.org/weaponbalance/
EOF
cat > /etc/systemd/system/xonotic-br.service <<EOF
[Unit]
Description=Xonotic Battle Royale server
After=network.target
Conflicts=xonotic.service
[Service]
WorkingDirectory=${xonotic_directory}
ExecStart=/usr/bin/console2web -a "${systempassword}" -p 62550 ${xonotic_directory}/all run dedicated +serverconfig server.cfg -userdir ${systemuserhome}/xonotic-br
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
#systemctl enable --now xonotic-br.service
cat > /etc/nginx/gameserver.d/xonotic.conf <<EOF
location /xonotic {
proxy_pass http://localhost:62550/;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host \$host;
}
EOF
firewall-cmd --zone=public --add-port=26000/udp --permanent

92
scripts/deploy_xonotic.sh Executable file
View File

@ -0,0 +1,92 @@
#!/bin/bash
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
if [ -e /etc/systemd/system/xonotic.service ]; then
systemctl stop xonotic
fi
# Xonotic
xonotic_directory="/opt/xonotic-${xonotic_version}"
curl --location https://dl.xonotic.org/xonotic-${xonotic_version}.zip > ${TMPDIR:-/tmp}/xonotic.zip
mkdir -p "${xonotic_directory}"
unzip -o -d ${xonotic_directory} ${TMPDIR:-/tmp}/xonotic.zip
rm -f ${TMPDIR:-/tmp}/xonotic.zip
mkdir -p ${systemuserhome}/xonotic/data
chown -R ${systemuser}: ${systemuserhome}/xonotic
cat > ${systemuserhome}/xonotic/data/server.cfg <<EOF
sv_public 0
hostname "onFOSS"
maxplayers 64
port 26000
log_file "server.log"
g_start_delay 15
g_maplist ""
g_maplist_shuffle 1
gametype dm
rcon_password "onFOSS"
bot_number 4
skill 8
minplayers 4
bot_prefix [BOT]
g_maplist_votable 6
sv_vote_gametype 1
sv_vote_gametype_options "dm tdm dom ctf ca rc nb as kh inv ka lms ons"
sv_vote_call 1
sv_weaponstats_file http://www.xonotic.org/weaponbalance/
sv_logscores_console 1
sv_logscores_file 1
sv_logscores_filename xonscore.txt
EOF
cat > /etc/systemd/system/xonotic.service <<EOF
[Unit]
Description=Xonotic server
After=network.target
Conflicts=xonotic-br.service
[Service]
WorkingDirectory=${xonotic_directory}/Xonotic
ExecStart=/usr/bin/console2web -a "${systempassword}" -p 62550 ${xonotic_directory}/Xonotic/xonotic-linux64-dedicated +serverconfig server.cfg -userdir ${systemuserhome}/xonotic
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now xonotic.service
cat > /etc/nginx/gameserver.d/xonotic.conf <<EOF
location /xonotic {
proxy_pass http://localhost:62550/;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host \$host;
}
EOF
if ! [ -h /var/www/html/xonscore.txt ]; then
ln -s "${systemuserhome}"/xonotic/data/data/xonscore.txt /var/www/html
fi
firewall-cmd --zone=public --add-port=26000/udp --permanent

99
website/_data/events.yml Normal file
View File

@ -0,0 +1,99 @@
- date: 2024-05-06T12:00:00UTC
intro: "onFOSS-LAN hosted by hribhrib"
games:
- time: "12:00"
title: "Get and chill together"
- time: "13:00"
title: "OpenSpades"
- time: "14:30"
title: "Blockbomber"
- time: "15:30"
title: "Break"
- time: "16:00"
title: "Xonotic"
tournament: true
- time: "18:00"
title: "Break"
- time: "18:30"
title: "OpenHV"
- time: "20:00"
title: "Mindustry"
- date: 2022-12-17T14:00:00UTC
intro: "onFOSS-LAN hosted by DeathByDenim"
games:
- time: "14:00"
title: "Get together"
- time: "14:30"
title: "Doom (ODAMEX) XMAS mod"
- time: "15:15"
title: "Teeworlds"
- time: "16:00"
title: "OpenSpades"
- time: "17:00"
title: "Break"
- time: "18:00"
title: "Lix"
- time: "18:30"
title: "Free Play!"
extras: ["Shattered Paradise"]
- date: 2022-07-02T14:00:00UTC
intro: "onFOSS-LAN hosted by DeathByDenim"
games:
- time: "14:00"
title: "OpenSoldat"
- time: "15:00"
title: "Lix"
- time: "16:00"
title: "Teeworlds DDrace"
- time: "17:00"
title: "Free play!"
extras: ["OpenSpades", "OpenHV"]
- date: 2022-03-19T14:00:00UTC
intro: "onFOSS-LAN hosted by DeathByDenim"
games:
- time: "14:00"
title: "Armagetron Advanced"
- time: "15:00"
title: "Xonotic - Battle Royale"
- time: "16:00"
title: "Lix"
- time: "16:30"
title: "Free play!"
extras: ["Hedgewars", "SuperTuxKart (Race and Soccer modes)"]
content: |
<p>
Additionally, there was a fundraiser to help the people suffering
from the war in Ukraine &#x1F1FA;&#x1F1E6;. I matched your donation
(up to $500 total) and additionally, the government of Canada
&#x1F1E8;&#x1F1E6; will match mine until 18 March. So, that's triple
the value for any donation you make. It doesn't have to be to the
Canadian Red Cross, you probably have a local equivalent.
</p>
<p>
<em>UPDATE (2022-03-08)</em>: Canada reached the $10M already so they are not
doubling anymore. I'll still double but this means your amount won't
count as triple anymore.
</p>
<p>
<em>UPDATE (2022-03-13)</em>: Canada increased the limit to $30M, so
any donation you make is once again tripled.
</p>
<p>
<em>UPDATE (2022-03-14)</em>: Oh, never mind, this goal has already
been reached. Anyway, I'll still match what you donate!
</p>
<p>
<em>UPDATE (2022-03-19)</em>: Donations are closed. A total amount
of &euro;40 was collected and the equivalent of CAD 55.64 was
donated to the Canadian Red Cross.
</p>
<p>List of donations:</p>
<ul>
<li>Anonymous: &euro;40</li>
</ul>
- date: 2022-02-12T15:00UTC
intro: "Session to test if it all works as intended"
games:
- title: "OpenSpades"
- title: "OpenHV"
- title: "Xonotic"

118
website/_data/games.yml Normal file
View File

@ -0,0 +1,118 @@
- name: armagetron
title: "Armagetron Advanced"
description: "Drive your lightcycle and leave a lightwall behind you. Survive as long as you can and try to make other run into walls."
download_link: "http://www.armagetronad.org/downloads.php"
has_console: true
console_output_coloring: "Terminal"
console_initial_command: "players"
console_help_link: "http://wiki.armagetronad.org/index.php?title=Console_Commands"
console_example_commands:
- ["players", "Show current players"]
- ["kick <name>", "Kick the player"]
- ["num_ais <num>", "Set the number of AIs for games with more than one player"]
- ["limit_rounds", "End the match after this number of rounds"]
- name: bzflag
title: "Bzflag"
description: "Drive around in a tank that can jump, trying to shoot your opponents while dodging their bullets."
download_link: "https://www.bzflag.org/downloads/"
has_console: true
console_output_coloring: "Terminal"
console_initial_command: "/playerlist"
console_help_link: "https://wiki.bzflag.org/Slash_Commands"
console_example_commands:
- ["/playerlist", "Display list of players"]
- ["/kick <name>", "Kick the player"]
- ["/gameover", "end the current game"]
- name: hedgewars
title: "Hedgewars"
description: "Worms-like game where your team of hedgehogs needs to destroy the other teams using the ludicrous arsenal at their disposal."
download_link: "https://www.hedgewars.org/download.html"
- name: lix
title: "Lix"
description: "Lemmings-like game where you need to guide your little people to safety despite their best efforts of wandering into things that will kill them."
download_link: "https://github.com/SimonN/LixD#get-lix"
- name: mindustry
title: "Mindustry"
description: "A building and tower defence game where you build up an industry and defences against ever larger waves of enemies."
download_link: "https://github.com/Anuken/Mindustry/releases"
has_console: true
console_output_coloring: "Terminal"
console_initial_command: "status"
console_help_link: "https://mindustrygame.github.io/wiki/servers/#dedicated-server-commands"
console_example_commands:
- ["status", "Display server status"]
- ["runwave", "Trigger the next wave"]
- ["kick <name>", "Kick a person by name"]
- name: minetest
title: "Minetest (Blockbomber)"
description: "The classic Bomberman game in 3D as a mod for Minetest"
download_link: "https://www.minetest.net/downloads/"
- name: odamex
title: "Odamex"
description: "Multiplayer-focused DOOM engine that allows deathmatch, coop, and capture the flag mode. Here we are using the Freedom assets so you don't need a copy of the original game to play."
download_link: "https://odamex.net/"
- name: openhv
title: "OpenHV"
description: "Real-time strategy game where you mine resources and build units to attack and defend."
download_link: "https://github.com/OpenHV/OpenHV/releases"
- name: openspades
title: "OpenSpades"
description: "Mix between a first person shooter and Minecraft. Build defence structures, dig many tunnels or go on the offensive."
warning: "uses potentially non-open assets. Fix is <a href=\"help_openspades.html#nonfreeassets\"> here</a>."
download_link: "https://github.com/yvt/openspades/releases"
- name: shatteredparadise
title: "Shattered Paradise"
description: "Real-time strategy game where you mine resources and build units to attack and defend."
download_link: "https://github.com/ABrandau/Shattered-Paradise-SDK/releases"
- name: opensoldat
title: "OpenSoldat"
description: "Fast-paced 2D side-scrolling shooter game where you have a big gun and a jetpack."
download_link: "https://github.com/opensoldat/opensoldat/releases/"
- name: supertuxkart
title: "SuperTuxKart"
description: "Kart racing game where you can use the various power-ups to give yourself a boost of hinder your opponents."
download_link: "https://supertuxkart.net/Download"
- name: supertuxparty
title: "Super Tux Party"
description: "Turn-based party game where you challenge other player in real-time mini games."
download_link: "https://supertux.party/download/latest/"
- name: teeworlds
title: "Teeworlds"
description: "Fast-paced 2D side-scrolling shooter game where you have a big gun and a grappling hook."
download_link: "https://www.teeworlds.com/?page=downloads"
has_console: true
console_output_coloring: "Terminal"
console_initial_command: "status"
console_help_link: "https://www.teeworlds.com/?page=docs&wiki=server_commands"
console_example_commands:
- ["status", "Display server status"]
- ["change_map <mapname>", "Switch to <mapname>"]
- ["kick <id>", "Kick a person by id"]
- name: ufoai
title: "UFO: Alien Invasion"
description: "Squad-based turn-based tactical strategy game in the tradition of the old X-COM PC games"
download_link: "https://ufoai.org/wiki/Download"
- name: unvanquished
title: "Unvanquished"
description: "First-person shooter of aliens vs humans. There are several classes and it's possible to build structures."
download_link: "https://unvanquished.net/download/"
has_console: true
console_output_coloring: "Daemoned"
console_initial_command: "/status"
console_help_link: "https://wiki.unvanquished.net/wiki/Server/Running#Commands"
console_example_commands:
- ["/listplayers", "List current players in-game"]
- ["/kick <name>", "Kick the player"]
- ["/nextmap", "Go to the next map in the rotation"]
- name: xonotic
title: "Xonotic"
description: "First-person shooter where players compete in a 3D world. It features Battle Royale mode."
download_link: "https://xonotic.org/download/"
has_console: true
console_output_coloring: "Daemoned"
console_initial_command: "who"
console_help_link: "https://gitlab.com/xonotic/xonotic/-/wikis/Basic-server-configuration"
console_example_commands:
- ["who", "List current players in-game"]
- ["kick <name>", "Kick the player"]
- ["gotomap <name>", "Go to the specified map"]

View File

@ -0,0 +1,24 @@
<script>
var event_year = {{ event.date | date: "%Y" }};
var event_month = {{ event.date | date: "%-m" }};
var event_day = {{ event.date | date: "%e" }};
var d = new Date(Date.UTC(event_year, event_month, event_day, {{ event.date | date: "%H" }}, {{ event.date | date: "%M" }}));
</script>
<ul>
{% for game in event.games %}
{% assign time = game.time | split: ":"%}
{% if game.time %}
<li>{{ game.time }}UTC {{ game.title }}{%if game.tournament %} <a href="tournament.html" class="game-tournament">Tournament</a>{% endif %}<script>d=new Date(Date.UTC(event_year, event_month, event_day, {{ time | slice: 0 }}, {{ time | slice: 1 }}));document.writeln(" ("+ Intl.DateTimeFormat(undefined, {hour: '2-digit', minute: '2-digit', timeZoneName: 'short'}).format(d) + ")")</script></li>
{% else %}
<li>{{ game.title }}{%if game.tournament %} <a href="tournament.html" class="game-tournament">Tournament</a>{% endif %}</li>
{% endif %}
{% if game.extras %}
<ul>
{% for extra in game.extras %}
<li>{{ extra }}</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
{{ event.content }}

View File

@ -0,0 +1,28 @@
<nav class="container">
<header class="d-flex flex-wrap justify-content-center py-3 mb-4 border-bottom">
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-dark text-decoration-none">
<img class="bi me-2" width="40" height="32" src="/assets/img/icon.svg" alt="Site icon">
<span class="fs-4">onFOSS hosted by {{ site.content.hosted_by_name }}</span>
</a>
<ul class="nav nav-pills">
{% if layout.nav_pill %}
{% assign nav_pill = layout.nav_pill %}
{% else %}
{% assign nav_pill = page.nav_pill %}
{% endif %}
{% case nav_pill %}
{% when "tournament", "help", "admin" %}
{% assign home = false %}
{% else %}
{% assign home = true %}
{% endcase %}
<li class="nav-item"><a href="/index.html" class="nav-link {% if home %}active{% endif %}" aria-current="page">Home</a></li>
<li class="nav-item"><a href="/tournament.html" class="nav-link {% if nav_pill == "tournament" %}active{% endif %}">Tournament</a></li>
<li class="nav-item"><a href="/help.html" class="nav-link {% if nav_pill == "help" %}active{% endif %}">Help</a></li>
{% unless site.content.offline %}
<li class="nav-item"><a href="/admin.html" class="nav-link {% if nav_pill == "admin" %}active{% endif %}">Admin</a></li>
{% endunless %}
</ul>
</header>
</nav>

View File

@ -0,0 +1,2 @@
<div class="offline-blur">OFFLINE</div>
<div class="offline">OFFLINE</div>

View File

@ -0,0 +1,21 @@
<noscript>
Live stuff requires JavaScript unfortunately
</noscript>
<h6>CPU</h6>
<div class="graph">
<svg id="cpugraph" width="400" height="200" xmlns="http://www.w3.org/2000/svg">
<rect class="graphframe" x="0" y="0" width="301" height="100" />
</svg>
</div>
<h6>Memory</h6>
<div class="graph">
<svg id="memgraph" width="400" height="200" xmlns="http://www.w3.org/2000/svg">
<rect class="graphframe" x="0" y="0" width="301" height="100" />
</svg>
</div>
<script>
d3.select('#cpugraph').attr('viewBox', '0 0 310 100');
d3.select('#memgraph').attr('viewBox', '0 0 310 100');
update();
setInterval(update, 5000);
</script>

View File

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>onFOSS - Event page</title>
<link rel="stylesheet" href="/assets/css/main.css">
<link rel="stylesheet" href="/assets/css/serverstats.css">
<link rel="icon" href="/assets/img/icon.svg" sizes="any" type="image/svg+xml">
<script src="https://d3js.org/d3.v7.min.js"></script>
<script src="/js/serverstats.js"></script>
</head>
<body>
{% include nav.html %}
<div class="container">
<div class="row">
<div class="col-md-8">
{{ content }}
</div>
<div class="col-6 col-md-4">
<h5>Live stats</h5>
{% if site.content.offline %}
{% include offline.html %}
{% else %}
{% include online.html %}
{% endif %}
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,13 @@
---
layout: default
nav_pill: help
---
<link rel="stylesheet" href="assets/css/help.css">
{% assign game = site.data.games | where_exp: "item", "item.name == page.game" | first %}
<h1>{{ game.title }}</h1>
<p>{{ game.description }}</p>
<img src="assets/img/{{ game.name }}.png" alt="Screenshot of {{ game.title }}">
<h2>Getting the game</h2>
<div class="download"><a href="{{ game.download_link }}">DOWNLOAD</a></div>
{{ content }}
<p></p>

View File

@ -0,0 +1,8 @@
---
layout: default
nav_pill: news
---
<h1>{{ page.title }}</h1>
<p>{{ page.date | date_to_string }} - {{ page.author }}</p>
{{ content }}

View File

@ -0,0 +1,6 @@
---
author: DeathByDenim
---
Hello world!
How are you doing today?

View File

@ -0,0 +1,6 @@
---
author: DeathByDenim
---
Hello world!
How are you doing today?

71
website/_sass/base.scss Normal file
View File

@ -0,0 +1,71 @@
// Custom style matching https://onfoss.libregaming.org/
//$primary: darkorange;
//$secondary: red;
//$body-bg: black;
//$body-color: orange;
//$warning: yellow;
//$font-family-base: Ubuntu Mono, monospace;
//$link-color: #4FBAD5;
//$dark: darkorange;
//$nav-pills-link-active-color: darkblue;
//$nav-pills-link-active-bg: darkorange;
// If you want to provide the Ubuntu font, place those font files in assets/css/font
///* ubuntu-mono-regular - latin */
//@font-face {
//font-family: 'Ubuntu Mono';
//font-style: normal;
//font-weight: 400;
//src: url('font/ubuntu-mono-v14-latin-regular.eot'); /* IE9 Compat Modes */
//src: local(''),
//url('font/ubuntu-mono-v14-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
//url('font/ubuntu-mono-v14-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
//url('font/ubuntu-mono-v14-latin-regular.woff') format('woff'), /* Modern Browsers */
//url('font/ubuntu-mono-v14-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
//url('font/ubuntu-mono-v14-latin-regular.svg#UbuntuMono') format('svg'); /* Legacy iOS */
//}
///* ubuntu-mono-italic - latin */
//@font-face {
//font-family: 'Ubuntu Mono';
//font-style: italic;
//font-weight: 400;
//src: url('font/ubuntu-mono-v14-latin-italic.eot'); /* IE9 Compat Modes */
//src: local(''),
//url('font/ubuntu-mono-v14-latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
//url('font/ubuntu-mono-v14-latin-italic.woff2') format('woff2'), /* Super Modern Browsers */
//url('font/ubuntu-mono-v14-latin-italic.woff') format('woff'), /* Modern Browsers */
//url('font/ubuntu-mono-v14-latin-italic.ttf') format('truetype'), /* Safari, Android, iOS */
//url('font/ubuntu-mono-v14-latin-italic.svg#UbuntuMono') format('svg'); /* Legacy iOS */
//}
///* ubuntu-mono-700 - latin */
//@font-face {
//font-family: 'Ubuntu Mono';
//font-style: normal;
//font-weight: 700;
//src: url('font/ubuntu-mono-v14-latin-700.eot'); /* IE9 Compat Modes */
//src: local(''),
//url('font/ubuntu-mono-v14-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
//url('font/ubuntu-mono-v14-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
//url('font/ubuntu-mono-v14-latin-700.woff') format('woff'), /* Modern Browsers */
//url('font/ubuntu-mono-v14-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
//url('font/ubuntu-mono-v14-latin-700.svg#UbuntuMono') format('svg'); /* Legacy iOS */
//}
///* ubuntu-mono-700italic - latin */
//@font-face {
//font-family: 'Ubuntu Mono';
//font-style: italic;
//font-weight: 700;
//src: url('font/ubuntu-mono-v14-latin-700italic.eot'); /* IE9 Compat Modes */
//src: local(''),
//url('font/ubuntu-mono-v14-latin-700italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
//url('font/ubuntu-mono-v14-latin-700italic.woff2') format('woff2'), /* Super Modern Browsers */
//url('font/ubuntu-mono-v14-latin-700italic.woff') format('woff'), /* Modern Browsers */
//url('font/ubuntu-mono-v14-latin-700italic.ttf') format('truetype'), /* Safari, Android, iOS */
//url('font/ubuntu-mono-v14-latin-700italic.svg#UbuntuMono') format('svg'); /* Legacy iOS */
//}

10
website/admin.html Normal file
View File

@ -0,0 +1,10 @@
---
layout: default
nav_pill: admin
---
<link rel="stylesheet" href="assets/css/terminal.css">
<script src="assets/js/terminalcolors.js"></script>
<script src="js/consoles.js"></script>
<div id="console-div">
<noscript>The admin console needs JavaScript to function since it uses web sockets to connect to the controller processes</noscript>
</div>

View File

@ -0,0 +1,15 @@
.download {
margin-top: 2em;
margin-bottom: 2em;
}
.download a {
color: #222;
font-weight: bold;
text-decoration: none;
border: solid 3px #bbb;
border-radius: 30px;
padding: 1em;
margin: 1em;
background-color: #eee;
}

View File

@ -0,0 +1,5 @@
---
---
@import "base";
@import "bootstrap/bootstrap";

View File

@ -0,0 +1,39 @@
.cpu {
stroke: hotpink;
stroke-width: 3px;
}
.mem {
stroke: darkgreen;
stroke-width: 3px;
}
.graph {
}
.graphframe {
stroke: black;
fill: none;
}
.offline {
color: red;
font-size: 300%;
font-weight: bold;
}
.offline-blur {
position: absolute;
color: red;
font-size: 300%;
font-weight: bold;
animation-name: glow;
animation-duration: 4s;
animation-iteration-count: infinite;
}
@keyframes glow {
from {
filter: blur(.05em);
}
50% {
filter: blur(.1em);
}
to {
filter: blur(.05em);
}
}

View File

@ -0,0 +1,121 @@
:root {
--terminal-color-0: rgb(30,34,41);
--terminal-color-1: rgb(237,21,21);
--terminal-color-2: rgb(68,133,58);
--terminal-color-3: rgb(246,116,192);
--terminal-color-4: rgb(29,153,243);
--terminal-color-5: rgb(155,89,182);
--terminal-color-6: rgb(=26,188,156);
--terminal-color-7: rgb(252,252,252);
--terminal-color-0-intense: rgb(127,140,141);
--terminal-color-1-intense: rgb(192,57,43);
--terminal-color-2-intense: rgb(50,100,44);
--terminal-color-3-intense: rgb(253,188,75);
--terminal-color-4-intense: rgb(61,174,233);
--terminal-color-5-intense: rgb(142,68,173);
--terminal-color-6-intense: rgb(22,160,133);
--terminal-color-7-intense: rgb(255,255,255);
--terminal-color-default: rgb(23,168,139);
--terminal-color-background: rgb(30,34,41);
}
.console_output {
border: solid grey;
background-color: var(--terminal-color-background);
width: min(95%, 1024px);
height: 30em;
overflow-x: hidden;
overflow-y: auto;
display: flex;
flex-direction: column-reverse;
}
.console_output p {
margin: 0;
padding: 0;
font-family: monospace;
white-space: pre-wrap;
color: var(--terminal-color-default);
display: inline-block;
}
.user_input::before {
content: '$ ';
color: var(--terminal-color-7-intense);
}
.console_command {
width: calc(min(95%, 1024px) - 8em);
}
.console_submit {
width: 6em;
padding: 0;
margin: 0;
border-radius: 0;
text-shadow: 0;
}
.console_help {
width: 2em;
padding: 0;
margin: 0;
border-radius: 0;
text-shadow: 0;
}
.TERM_FOREGROUND_0 {
color: var(--terminal-color-0);
}
.TERM_FOREGROUND_1 {
color: var(--terminal-color-1);
}
.TERM_FOREGROUND_2 {
color: var(--terminal-color-2);
}
.TERM_FOREGROUND_3 {
color: var(--terminal-color-3);
}
.TERM_FOREGROUND_4 {
color: var(--terminal-color-4);
}
.TERM_FOREGROUND_5 {
color: var(--terminal-color-5);
}
.TERM_FOREGROUND_6 {
color: var(--terminal-color-6);
}
.TERM_FOREGROUND_7 {
color: var(--terminal-color-7);
}
.TERM_FOREGROUND_0_INTENSE {
color: var(--terminal-color-0-intense);
}
.TERM_FOREGROUND_1_INTENSE {
color: var(--terminal-color-1-intense);
}
.TERM_FOREGROUND_2_INTENSE {
color: var(--terminal-color-2-intense);
}
.TERM_FOREGROUND_3_INTENSE {
color: var(--terminal-color-3-intense);
}
.TERM_FOREGROUND_4_INTENSE {
color: var(--terminal-color-4-intense);
}
.TERM_FOREGROUND_5_INTENSE {
color: var(--terminal-color-5-intense);
}
.TERM_FOREGROUND_6_INTENSE {
color: var(--terminal-color-6-intense);
}
.TERM_FOREGROUND_7_INTENSE {
color: var(--terminal-color-7-intense);
}
.TERM_FOREGROUND_BOLD {
font-weight: bold;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

408
website/assets/img/icon.svg Normal file
View File

@ -0,0 +1,408 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="6.6145835mm"
height="6.6145835mm"
viewBox="0 0 6.6145835 6.6145835"
version="1.1"
id="svg100451"
inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
sodipodi:docname="blackmage.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview100453"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="22.627417"
inkscape:cx="4.8613591"
inkscape:cy="13.523417"
inkscape:window-width="1540"
inkscape:window-height="862"
inkscape:window-x="722"
inkscape:window-y="34"
inkscape:window-maximized="0"
inkscape:current-layer="layer3" />
<defs
id="defs100448" />
<g
inkscape:label="Laag 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-115.94271,-125.8427)"
style="display:none;opacity:0.355982">
<image
width="6.6145835"
height="6.6145835"
preserveAspectRatio="none"
style="image-rendering:optimizeSpeed"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAB
IElEQVRIia2VQRKCMAxFfxwvVZf2Bnoc1h5Hb1CXcqy4YAohJGlF/kwHKMx/SdMUYmbGASIiAIBl
dz7MvCzPGvQXhIhmcwB4ve3vdkF09BVwfxywXJ55SyakmmlF5l4WJkSvs6We6EMIM4OI8BzW87fr
+v4XEHl9IpcsAkYFb0IsmAWsikAhRO4mytv3GuiB/oJYMBPEjgBwKtO1Nep3z2Ea2taE/ALQICvu
sONTmdIeM23mPHXVRNbhAtvQgo55e/qaEN3tlNeRV3MvGw90kg/M7O6iMbePG0/usQIsEX9AwE4A
oDKRSoXn5fFq06vu/0nUjEBceDcTYJ1NKjwPubt6FEI0aK+aEAmSWUnwmAmpsPtHNZux1dXSvELl
nK7NF18iI9LSnZznAAAAAElFTkSuQmCC
"
id="image100814"
x="115.94271"
y="125.8427" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Laag 2"
style="display:inline;opacity:1">
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect107655"
width="0.26458332"
height="0.26458332"
x="1.0583333"
y="1.5875" />
<rect
style="fill:#000000;stroke-width:0.648093"
id="rect107737"
width="1.5875"
height="0.26458332"
x="1.3229166"
y="1.3229166" />
<rect
style="fill:#000000;stroke-width:0.374177"
id="rect107739"
width="0.52916664"
height="0.26458332"
x="2.9104166"
y="1.0583333" />
<rect
style="fill:#000000;stroke-width:0.374177"
id="rect107741"
width="0.52916664"
height="0.26458332"
x="3.4395833"
y="0.79374993" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect107743"
width="0.26458332"
height="0.26458332"
x="3.96875"
y="0.52916658" />
<rect
style="fill:#000000;stroke-width:0.374177"
id="rect107745"
width="0.52916664"
height="0.26458332"
x="4.2333331"
y="0.26458323" />
<rect
style="fill:#000000;stroke-width:0.374177"
id="rect107747"
width="0.52916664"
height="0.26458332"
x="4.7624998"
y="-1.1920929e-07" />
<rect
style="fill:#000000;stroke-width:0.374177"
id="rect107749"
width="0.26458332"
height="0.52916664"
x="5.2916665"
y="0.2645832" />
<rect
style="fill:#000000;stroke-width:0.374177"
id="rect107751"
width="0.26458332"
height="0.52916664"
x="5.0270834"
y="0.79374981" />
<rect
style="fill:#000000;stroke-width:0.458271"
id="rect107753"
width="0.26458332"
height="0.79374999"
x="4.7625003"
y="1.3229165" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect107755"
width="0.26458332"
height="0.26458332"
x="4.4979172"
y="2.1166666" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect107757"
width="0.26458332"
height="0.26458332"
x="4.7625003"
y="2.3812499" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect107759"
width="0.26458332"
height="0.26458332"
x="5.0270834"
y="2.6458333" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect107761"
width="0.26458332"
height="0.26458332"
x="5.2916665"
y="2.9104166" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect107763"
width="0.26458332"
height="0.26458332"
x="5.5562496"
y="3.175" />
<path
id="rect142063"
style="fill:#39bdff;stroke-width:0.264583"
d="m 1.5875002,3.4395833 h 0.2645831 l 3e-7,-0.2645833 h 3.1749993 v 0.2645833 l 5e-7,0.5291667 H 4.7625003 V 4.2333331 H 5.0270834 V 5.2916665 H 4.7625003 v 0.7937498 h 0.2645831 l 2e-7,0.2645829 0.2645829,2e-7 V 6.6145825 H 1.3229166 V 6.3499994 l 0.2645833,-10e-8 z"
sodipodi:nodetypes="cccccccccccccccccccc" />
<path
id="rect107765"
style="stroke-width:0.374177"
d="M 5.0270829,3.4395833 H 5.5562496 V 3.7041666 H 5.2916663 l 4e-7,0.2645834 H 5.0270833 l -4e-7,-0.2645834 z"
sodipodi:nodetypes="cccccccc" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect107866"
width="0.26458332"
height="0.26458332"
x="4.7624998"
y="3.175" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect107868"
width="0.26458332"
height="0.26458332"
x="1.3229166"
y="1.8520833" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect108293"
width="0.26458332"
height="0.26458332"
x="4.7625003"
y="3.96875" />
<rect
style="fill:#000000;stroke-width:0.529166"
id="rect108295"
width="0.26458332"
height="1.0583333"
x="5.0270834"
y="4.2333331" />
<rect
style="fill:#000000;stroke-width:0.458271"
id="rect108297"
width="0.26458332"
height="0.79374999"
x="4.7625003"
y="5.2916665" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect108299"
width="0.26458332"
height="0.26458332"
x="5.0270834"
y="6.0854163" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect108301"
width="0.26458332"
height="0.26458332"
x="4.4979172"
y="6.0854163" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect108303"
width="0.26458332"
height="0.26458332"
x="5.2916665"
y="6.3499994" />
<rect
style="fill:#000000;stroke-width:0.374177"
id="rect108305"
width="0.52916664"
height="0.26458332"
x="3.9687505"
y="6.3499994" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect108307"
width="0.26458332"
height="0.26458332"
x="3.7041674"
y="6.0854163" />
<rect
style="fill:#000000;stroke-width:0.374177"
id="rect108309"
width="0.26458332"
height="0.52916664"
x="3.439584"
y="5.5562496" />
<path
id="rect108311"
style="stroke-width:0.591626"
d="M 2.9104167,4.2333331 H 3.439584 V 5.5562497 H 3.1750007 l -0.5291674,3e-7 V 5.2916667 h 0.5291674 v -0.79375 h -0.264584 z"
sodipodi:nodetypes="cccccccccc" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect108697"
width="0.26458332"
height="0.26458332"
x="2.6458333"
y="4.4979167" />
<path
id="rect108699"
style="stroke-width:0.458271"
d="m 1.5875,2.1166666 h 0.79375 v 0.2645833 l 0.79375,1e-7 v 0.2645833 h 0.79375 v 0.2645834 h 0.5291667 v 0.5291666 l 0.2645831,-3.9e-6 2e-7,0.2645873 H 3.175 V 3.96875 H 2.38125 V 3.7041667 H 1.8520833 V 3.4395833 H 2.1166667 V 3.175 H 1.8520833 V 2.6458333 h 0.2645834 l -3.6e-6,-0.2645875 -0.5291667,-10e-8 z"
sodipodi:nodetypes="ccccccccccccccccccccccccc" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect111069"
width="0.26458332"
height="0.26458332"
x="1.5875002"
y="3.175" />
<path
id="rect111071"
style="stroke-width:0.458271"
d="m 1.3229169,3.4395833 h 0.2645833 v 0.79375 H 1.0583333 V 3.96875 h 0.2645834 z"
sodipodi:nodetypes="ccccccc" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect111609"
width="0.26458332"
height="0.26458332"
x="0.79374993"
y="4.2333331" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect111611"
width="0.26458332"
height="0.26458332"
x="1.0583333"
y="4.4979162" />
<path
id="rect111613"
style="stroke-width:0.648093"
d="m 1.3229166,4.7624993 0.5291667,7e-7 V 5.0270833 H 1.5875 l -10e-8,1.322916 H 1.3229166 Z"
sodipodi:nodetypes="ccccccc" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect111923"
width="0.26458332"
height="0.26458332"
x="1.0583333"
y="6.3499994" />
<rect
style="fill:#000000;stroke-width:0.374177"
id="rect111925"
width="0.26458332"
height="0.52916664"
x="1.8520833"
y="4.2333331" />
<rect
style="fill:#000000;stroke-width:0.374177"
id="rect111927"
width="0.26458332"
height="0.52916664"
x="1.8520833"
y="5.0270834" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect111929"
width="0.26458332"
height="0.26458332"
x="2.1166666"
y="5.5562501" />
<rect
style="fill:#000000;stroke-width:0.264583"
id="rect111931"
width="0.26458332"
height="0.26458332"
x="2.3812499"
y="5.8208332" />
<rect
style="fill:#000000;stroke-width:0.374177"
id="rect111933"
width="0.52916664"
height="0.26458332"
x="2.6458333"
y="6.0854163" />
<rect
style="fill:#000000;stroke-width:0.458271"
id="rect111935"
width="0.79374999"
height="0.26458332"
x="3.439584"
y="3.96875" />
<path
id="rect147135"
style="fill:#ffbd00;stroke-width:0.529166"
d="m 1.0583333,4.2333331 0.5291669,2e-7 -2e-7,-0.2645833 h 0.2645833 l 10e-8,0.7937497 H 1.3229167 l -10e-8,-0.2645835 H 1.0583333 Z"
sodipodi:nodetypes="ccccccccc" />
<path
id="path147866"
style="fill:#ffbd00;stroke-width:0.529166"
d="m 2.3812497,4.7624996 0.5291669,2e-7 -2e-7,-0.2645833 h 0.2645833 l 1e-7,0.7937497 H 2.6458331 l -10e-8,-0.2645835 H 2.3812497 Z"
sodipodi:nodetypes="ccccccccc" />
<path
id="path151355"
style="fill:#ad7b00;stroke-width:0.529166;fill-opacity:1"
d="m 1.3229167,1.5875002 1.5874999,-2e-7 V 1.3229166 H 3.4395833 V 1.0583333 H 3.96875 V 0.79374993 H 4.2333331 V 0.52916658 H 4.7624998 V 0.26458323 l 0.5291667,-3e-8 v 0.52916661 l -0.2645762,-2e-8 -6.9e-6,0.52916671 H 4.7625003 V 2.1166666 H 4.4979172 V 2.3812499 H 4.7625003 V 2.6458333 H 5.0270834 V 2.9104166 H 5.2916665 V 3.175 H 5.5562496 V 3.4395833 H 5.0270829 V 3.175 H 4.4979167 V 2.9104167 H 3.96875 V 2.6458333 H 3.175 V 2.38125 l -0.79375,-1e-7 V 2.1166666 H 1.5875 V 1.8520833 H 1.3229167 Z"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccc" />
<path
id="path147872"
style="fill:#ffbd00;stroke-width:0.529166"
d="m 1.3229167,1.5875002 1.5874999,-2e-7 V 1.3229166 H 3.4395833 V 1.0583333 H 3.96875 V 0.79374993 H 4.2333331 V 0.52916658 H 4.7624998 V 0.26458323 l 0.5291667,-3e-8 2e-7,0.26458347 H 5.0270833 l 7e-6,0.26458312 L 4.7625,0.79375 V 1.0583333 H 4.2333333 v 0.2645834 l -0.5238095,-0.00485 -0.00536,0.2694265 H 3.4395833 V 1.8520833 H 3.7041667 V 2.1166667 H 4.2333333 V 2.38125 h -0.79375 V 2.1166667 h -0.79375 V 1.8520833 H 1.3229167 Z"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccc" />
<rect
style="fill:#ffbd00;fill-opacity:1;stroke-width:0.374177"
id="rect160539"
width="0.26458332"
height="0.52916664"
x="2.3812499"
y="2.6458333" />
<rect
style="fill:#ffbd00;fill-opacity:1;stroke-width:0.187088"
id="rect160559"
width="0.26458332"
height="0.13229166"
x="3.175"
y="2.9104166" />
<rect
style="fill:#ffbd00;fill-opacity:1;stroke-width:0.132291"
id="rect160561"
width="0.13229166"
height="0.13229166"
x="3.4395833"
y="3.0427082" />
<rect
style="fill:#ffbd00;fill-opacity:1;stroke-width:0.132291"
id="rect160563"
width="0.13229166"
height="0.13229166"
x="3.0427084"
y="3.0427082" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

BIN
website/assets/img/lix.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

View File

@ -0,0 +1,117 @@
// Collection of scripts to deploy a server hosting several open-source games
// Copyright (C) 2022 Jarno van der Kolk
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// Shell command can have control codes. Some of these mean colours.
function convertTerminalCodeToHtml(line) {
let htmlline = "";
let open_spans = 0;
for(let i = 0; i < line.length; i++) {
if(line[i] == '\033') {
let code = line[++i]
if(code == '[') {
// This means it's a colour
while(i < line.length && line[i] != 'm') {
let colour_code = "";
for(i++; i < line.length && line[i] != 'm' && line[i] != ';'; i++) {
colour_code += line[i];
}
colour_code = parseInt(colour_code);
if(colour_code === 0) {
for(let i = 0; i < open_spans; i++) {
htmlline += "</span>";
}
open_spans = 0;
}
if(colour_code === 1) {
htmlline += '<span class="TERM_FOREGROUND_BOLD">';
open_spans++;
}
else if(colour_code >= 30 && colour_code <= 37) {
htmlline += '<span class="TERM_FOREGROUND_'+(colour_code-30)+'">';
open_spans++;
}
else if(colour_code >= 90 && colour_code <= 97) {
htmlline += '<span class="TERM_FOREGROUND_'+(colour_code-90)+'_INTENSE">';
open_spans++;
}
}
}
}
else if(line[i] == '<') {
htmlline += "&lt;"
}
else if(line[i] == '>') {
htmlline += "&gt;"
}
else if(line[i] == '&') {
htmlline += "&amp;"
}
else {
htmlline += line[i];
}
}
for(let i = 0; i < open_spans; i++) {
htmlline += "</span>";
}
return htmlline
}
// Shell command can have control codes. Some of these mean colours.
function convertDaemonedCodeToHtml(line) {
let htmlline = "";
let open_spans = 0;
for(let i = 0; i < line.length; i++) {
if(line[i] == '^') {
let code = line[++i]
for(let i = 0; i < open_spans; i++) {
htmlline += "</span>";
}
open_spans = 0;
if(code == 'N') {
htmlline += '<span class="TERM_FOREGROUND_BOLD">';
open_spans++;
}
else {
let colour_code = parseInt(code);
if(colour_code >= 0) {
htmlline += '<span class="TERM_FOREGROUND_'+colour_code+'">';
open_spans++;
}
}
}
else if(line[i] == '<') {
htmlline += "&lt;"
}
else if(line[i] == '>') {
htmlline += "&gt;"
}
else if(line[i] == '&') {
htmlline += "&amp;"
}
else {
htmlline += line[i];
}
}
for(let i = 0; i < open_spans; i++) {
htmlline += "</span>";
}
return htmlline
}

12
website/help.html Normal file
View File

@ -0,0 +1,12 @@
---
layout: default
nav_pill: help
---
<h1>Help</h1>
<p>Each game has their own separate help page</p>
<ul>
{% assign sorted_games = site.data.games | sort: "title" %}
{% for game in sorted_games %}
<li><a href="help_{{ game.name }}.html">{{ game.title }}</a></li>
{% endfor %}
</ul>

View File

@ -0,0 +1,19 @@
---
layout: help
game: armagetron
---
<h2>Tips</h2>
<ul>
<li>Press the down arrow key to brake</li>
<li>Drive as close as you can to a wall to get a speed boost</li>
</ul>
<h2>Connecting</h2>
<p>
Use the arrow keys to nagivate to Play Game and press &lt;Enter&gt;.
Then go to Multiplayer and then to Custom Connect.
</p>
<p>
Enter <span class="fw-bold">{{ site.content.domain_name }}</span> in the Address field and keep the port number at <span class="fw-bold">4534</span>.
Navigate down to Connect to Server to join.
</p>
<p>You should now be connected.</p>

18
website/help_bzflag.html Normal file
View File

@ -0,0 +1,18 @@
---
layout: help
game: bzflag
---
<h2>Tips</h2>
<ul>
<li>Jump using the &lt;Tab&gt; key</li>
<li>Shoot using the &lt;Enter&gt; key</li>
<li>You stay still by placing the mouse cursor on the centre of the screen. Placing it slightly above will slowly move forward and all the way at the top means maximum speed. The same for turning left or right or reversing.</li>
</ul>
<h2>Connecting</h2>
<p>Use the arrow keys to nagivate to Join Game and press &lt;Enter&gt;.</p>
<p>
Move down to Server and type <span class="fw-bold">{{ site.content.domain_name }}</span> and keep the port number at <span class="fw-bold">5154</span>.
You can also set your Callsign here. This is how other players will see
your name. Then move up to Connect and press &lt;Enter&gt;.</p>
<img src="assets/img/help_bzflag.png" alt="Server join screen for Bzflag" class="img-fluid">
<p>You should now be connected.</p>

View File

@ -0,0 +1,34 @@
---
layout: help
game: hedgewars
---
<h2>Tips</h2>
<ul>
<li>Use the right mouse button to open the weapons menu.</li>
<li>
Use the arrow keys to move around. You can jump with &lt;Enter&gt;
or do a long jump &lt;Backspace&gt;.
</li>
<li>
Hold down &lt;Space&gt; to shoot. The longer you keep it pressed,
the further you will shoot.
</li>
</ul>
<h2>Connecting</h2>
<p>
To set your in-game name, click on the wrench icon at the bottom-right.
You can set your name under the Network tab. A password is not necessary.
</p>
<p>
Go back to the main menu by clicking on the red arrow at the bottom
left of the screen and click the globe on the right and choose
&quot;Play local network game&quot;. A new screen will open up.
</p>
<p>
At the bottom, there is a button called &quot;Specify addres&quot;.
Fill in <span class="fw-bold">{{ site.content.domain_name }}</span> for the host and leave the port number at <span class="fw-bold">46631</span>.
</p>
<img src="assets/img/help_hedgewars.png" alt="Connection settings for Hedgewars" class="img-fluid">
<p>
You should now see a list of rooms. There should be one room you can join.
</p>

17
website/help_lix.html Normal file
View File

@ -0,0 +1,17 @@
---
layout: help
game: lix
---
<h2>Tips</h2>
<ul>
<li>You can only control the Lix that are the colour you chose</li>
<li>You only get points for Lix going into the exits that are in your colour</li>
<li>You also get points if other coloured Lix go into your exits</li>
<li>The baseball bat is a great way to get rid of enemy blockers</li>
</ul>
<h2>Connecting</h2>
<p>Click on &quot;Options&quot;. Then under the &quot;General&quot; tab, you can input your player name. Click on &quot;Okay&quot; to confirm.</p>
<p>Click on &quot;Network Game&quot;.</p>
<p>Under address, fill out <span class="fw-bold">{{ site.content.domain_name }}</span> and keep the port set to <span class="fw-bold">22934</span>. Then click on &quot;Okay&quot; to connect.</p>
<p>You should see a room on the upper right. Click on that to join.</p>
<p>Choose your colour and then click &quot;Okay&quot;</p>

View File

@ -0,0 +1,22 @@
---
layout: help
game: mindustry
---
<h2>Tips</h2>
<ul>
<li>
There is lots of stuff to build, so at first things will be
daunting, but worry not, the mode is co-op so you are all
working together.
</li>
<li>Move around with the WASD keys.</li>
<li>Use the left mouse button to shoot or build. It will build if you select something from the menu in the bottom right, otherwise it will shoot.</li>
</ul>
<h2>Connecting</h2>
<p>
From the main menu choose &quot;Play&quot; and then &quot;Join
Game&quot;. You will be able to set you in-game name here.
</p>
<p>To join the server, click on &quot;Add Server&quot; and type in <span class="fw-bold">{{ site.content.domain_name }}</span>. When you press Ok, it will be added under &quot;Remote Servers&quot;.</p>
<img src="assets/img/help_mindustry.png" alt="The join screen in Mindustry with the server added" class="img-fluid">
<p>You can then click on the server name to join.</p>

View File

@ -0,0 +1,19 @@
---
layout: help
game: minetest
---
<h2>Tips</h2>
<ul>
<li>Movement: A, S, W, D</li>
<li>Drop bomb: Left Shift (sneak)(</li>
<li>Throw a bomb that you are standing in: Space (jump) (if player has Spring)</li>
<li>Punch bomb: Left mouse button (punch) (with Fist)</li>
</ul>
<h2>Connecting</h2>
<p>
Under address fill in <span class="fw-bold">{{ site.content.domain_name }}</span> and keep the port at
<span class="fw-bold">30000</span>. Click on Register to set your in-game name. You can leave the password blank
since this server will disappear after the event anyway.
</p>
<img src="assets/img/help_minetest.png" alt="The register screen in the Minetest client" class="img-fluid">
<p>You will be placed in the lobby with the other players</p>

17
website/help_odamex.html Normal file
View File

@ -0,0 +1,17 @@
---
layout: help
game: odamex
download_link: https://odamex.net/
---
<p>An AppImage for Linux was automatically generated: {% if site.content.offline %}Odamex-x86_64.AppImage (only available when game servers are online){% else %}<a href="assets/Odamex-x86_64.AppImage">Odamex-x86_64.AppImage</a>{% endif %}</p>
<h2>Tips</h2>
<ul>
<li>Use &lt;SPACE&gt; to jump</li>
<li>Use E to open doors or to respawn if dead</li>
</ul>
<h2>Connecting</h2>
<p>While Odamex does have a launcher, if requires that you have DOOM assets available locally. It won't launch the game without it, which means you either need the original game data of open assets such as Freedoom.</p>
<p>However, if you connect to the game server directly, odamex will download the required assets automatically from the server.</p>
<p>From the terminal, type:</p>
<p><tt>odamex -connect {{ site.content.domain_name }} +set cl_name "YourName"</tt></p>
<p>Of course, substitute &quot;YourName&quot; with the in-game name you want.</p>

30
website/help_openhv.html Normal file
View File

@ -0,0 +1,30 @@
---
layout: help
game: openhv
---
<p>You will have to expand &quot;Assets&quot; to see the download links.</p>
<h2>Tips</h2>
<ul>
<li>
The menu on the right lets you build buildings and units. The first
things you need to build are a Power Plant (gives you power), a
Module (builds units) and Storage (harvests resources).
</li>
<li>
When you build your Storage, there will be a Miner that comes with
it. Use this to harvest resources. Resources will look like a couple
of ingots.
</li>
</ul>
<h2>Connecting</h2>
<p>
To set your in-game name, click on &quot;Settings&quot;. You'll be
able to set your name under &quot;Player Name&quot;.
</p>
<p>
From the main menu, click on &quot;Multiplayer&quot; and then click
on &quot;Direct IP&quot;. Fill in <span class="fw-bold">{{ site.content.domain_name }}</span> and keep the port at
<span class="fw-bold">1234</span>. Then click on &quot;Join&quot;
</p>
<img src="assets/img/help_openhv.png" alt="The join screen in OpenHV" class="img-fluid">
<p>You will be placed in the lobby with the other players</p>

View File

@ -0,0 +1,20 @@
---
layout: help
game: opensoldat
---
<p>The game does not have a GUI yet. You need to start it from the terminal/command prompt. When you do so, it will create a configs directory with a client.cfg file. You can add your settings to that.</p>
<p>The AppImage for Linux creates the config file in <tt>~/.config/share/Soldat/Soldat</tt> instead.</p>
<p>Things you might like to set:</p>
<ul>
<li><tt>cl_player_name YourNameGoesHere</tt></li>
<li><tt>r_fullscreen 1</tt></li>
</ul>
<h2>Tips</h2>
<ul>
<li>Use the right mouse button to use your jetpack.</li>
<li>Press Q to switch to your secondary weapon and E to throw grenades.</li>
</ul>
<h2>Connecting</h2>
<p>Start Soldat by typing:</p>
<p><tt>./soldat -join {{ site.content.domain_name }}</tt></p>
<p>You should now be connected. If it doesn't work. Try to connect by IP address instead of domain name.</p>

View File

@ -0,0 +1,53 @@
---
layout: help
game: openspades
---
<h2>Tips</h2>
<ul>
<li>
On joining, you will be asked to choose a team and a weapon. If
you change your mind during play, press L to get back to that
selection screen.
</li>
<li>
Use the scroll wheel to cycle between your weapons, the shovel
and the block. The shovel can destroy blocks, the block can build
walls
</li>
<li>
If you want to see a bigger map, press N. Press N again to make
the map go away again.
</li>
</ul>
<h2 id="nonfreeassets">Non-free assets</h2>
<p>
OpenSpades contains non-free assets that were copied from the original
Ace of Spades games. The creators of OpenSpades were unabled to contact
the authors, so these assets were never released under an open licence.
</p>
<p>
Fortunately, there is a drop-in replacement for these assets available.
All models have been recreated under a CC0 licence and the sound effects
have been replaced by mostly CC0 equivalents with a few exceptions that
are CC-BY.
</p>
<h3>Installation</h3>
<ul>
<li>Download the libre assets: <a href="https://github.com/DeathByDenim/openspades-free-pak/releases/download/latest/pak001-Free.pak">pak001-Free.pak</a></li>
<li>Find the location of pak000-Nonfree.pak for your OpenSpades installation. For example <tt>/usr/share/openspades/Resources/</tt></li>
<li>Copy the downloaded pak001-Free.pak to the same location.</li>
<li>Optionally, delete pak000-Nonfree.pak. It it no longer needed because pak001-Free.pak will overrule all of the content in pak000-Nonfree.pak.</li>
</ul>
<h2>Connecting</h2>
<p>
When you start the game you will immediately enter the server
browser. If you click on &quot;Setup&quot; at the bottom of the
screen, you can set your in-game name. Click on &quot;Back&quot;
to return to the server browser.
</p>
<p>
To connect to the server, type <span class="fw-bold">{{ site.content.domain_name }}</span> in the input field at the
top and click on the &quot;Connect&quot; button to the right.
</p>
<img src="assets/img/help_openspades.png" alt="The join screen in OpenSpades" class="img-fluid">
<p></p>

View File

@ -0,0 +1,30 @@
---
layout: help
game: shatteredparadise
---
<p>You will have to expand &quot;Assets&quot; to see the download links.</p>
<h2>Tips</h2>
<ul>
<li>
The menu on the right lets you build buildings and units. The first
things you need to build are a Power Plant (gives you power), a
Infantry building (builds units) and Storage (harvests resources).
</li>
<li>
When you build your Storage, there will be a Miner that comes with
it. Use this to harvest resources. Resources will look like a forest.
You can build more harvester from the vehicle building.
</li>
</ul>
<h2>Connecting</h2>
<p>
To set your in-game name, click on &quot;Settings&quot;. You'll be
able to set your name under &quot;Player Name&quot;.
</p>
<p>
From the main menu, click on &quot;Multiplayer&quot; and then click
on &quot;Direct IP&quot;. Fill in <span class="fw-bold">{{ site.content.domain_name }}</span> and set the port at
<span class="fw-bold">12340</span>. The standard port is 1234, but is already taken. Then click on &quot;Join&quot;
</p>
<img src="assets/img/help_shatteredparadise.png" alt="The join screen in Shattered Paradise" class="img-fluid">
<p>You will be placed in the lobby with the other players</p>

View File

@ -0,0 +1,28 @@
---
layout: help
game: supertuxkart
---
<h2>Tips</h2>
<ul>
<li>Use the arrow keys to accelerate, brake, and steer.</li>
<li>Pick up presents to get items to use. Use &lt;Space*gt; to activate.</li>
<li>The blue bottle give you turbo. Use N to activate.</li>
<li>
Use V to grind in the corners and keep it pressed. Yellow sparks
will give you a speed boost. Red ones even more.
</li>
</ul>
<h2>Connecting</h2>
<p>
Click on the globe labelled &quot;Online&quot;. At the top, just
below the title, you can click the yellow button to set your in-game
name. You don't have to set a password.
</p>
<p>
To connect to our server, click on &quot;Enter server address&quot;.
Then type in <span class="fw-bold">{{ site.content.domain_name }}</span> and click on &quot;OK&quot;.
</p>
<img src="assets/img/help_supertuxkart.png" alt="Entering the server address" class="img-fluid">
<p>
You will then be placed in the lobby of our game server and ready to go!
</p>

View File

@ -0,0 +1,4 @@
---
layout: help
game: supertuxparty
---

View File

@ -0,0 +1,17 @@
---
layout: help
game: teeworlds
---
<p>Click the name of your OS on the left of the most recent version. Extract the file wherever you like and start playing.</p>
<h2>Tips</h2>
<ul>
<li>You can double jump by pressing &lt;Space&gt; a second time.</li>
<li>Use your grappling hook by using the right-mouse button.</li>
</ul>
<h2>Connecting</h2>
<p>Click on Settings and choose the Player tab. You can fill in your name so we can recognize you when you join the server. The Tee tab will also let you customize your appearance.</p>
<img src="assets/img/help_teeworlds_name.png" alt="Teeworlds setting for player name" class="img-fluid">
<p>To connect to the server, got back to the main menu and click Play.</p>
<p>At the bottom of the screen you can fill in the name of the server in the Host address field. Type <span class="fw-bold">{{ site.content.domain_name }}</span> and press &lt;Enter&gt; or click Connect.</p>
<img src="assets/img/help_teeworlds_server.png" alt="Joining the Teeworlds server" class="img-fluid">
<p>You should now be connected.</p>

25
website/help_ufoai.html Normal file
View File

@ -0,0 +1,25 @@
---
layout: help
game: ufoai
---
<p>The download page only has binaries for Linux and Windows. We compiled the macOS version ourselves. Download: <a href="https://www.jottacloud.com/s/2277232ff2022034678bafb62b3c9b7ef3a">ufoai-macos.tar.bz2</a></p>
<p>Then open the Terminal and type the following:</p>
<pre>
tar xf ufoai-macos.tar.bz2
cd dist
./ufo
</pre>
<p>To get rid of the graphical glitches disable &quot;GLSL Shaders&quot; under Options → Video → Advanced → OpenGL Setting</p>
<h2>Tips</h2>
<ul>
<li>Click on a squad member and then click where you want them to move. The target box will be green if you can make it in that turn. Walking is aborted if an enemy is spotted.</li>
<li>To shoot, click on the target button at the bottom left, choose what weapon mode you want to use and then click on your target.</li>
<li>Everything costs TUI. Actions will be greyed out of you don't have enough left for the current turn.</li>
</ul>
<h2>Connecting</h2>
<p>Click on Multiplayer. You'll need to create a team before you can do anything, so click on Team and then Generate New Team and choose the type you want.</p>
<img src="assets/img/help_ufoai.png" alt="Generating a new team" class="img-fluid">
<p>Click no the done button at the very bottom right if you are happy with it. You'll return to the multiplayer menu</p>
<p>Click on Join and type <span class="fw-bold">{{ site.content.domain_name }}</span> in the field for Connect to IP and click Connect.</p>
<img src="assets/img/help_ufoai_connect.png" alt="Joining the UFO:AI server" class="img-fluid">
<p>You'll see a summary of the server. Click on Connect to connect.</p>

View File

@ -0,0 +1,20 @@
---
layout: help
game: unvanquished
---
<h2>Tips</h2>
<ul>
<li>
As humans you can buy upgraded weapons at the armory. Get close
and press Q to activate. You can also become an engineer and build
defences or repair stuff.
</li>
<li>
As aliens you can evolve anywhere by pressing Q. They also have an
engineer class that can build structures.
</li>
</ul>
<h2>Connecting</h2>
<p>Set your in-game name by clicking on &quot;Player&quot; under &quot;Options&quot;.</p>
<p>To connect to the server, press ~ to open the console and type &quot;<span class="fw-bold">connect {{ site.content.domain_name }}</span>&quot;</p>
<img src="assets/img/help_unvanquished.png" alt="In-game terminal connecting to the game server" class="img-fluid">

28
website/help_xonotic.html Normal file
View File

@ -0,0 +1,28 @@
---
layout: help
game: xonotic
---
<p>Note that the download has the executable for all OS inside of it.</p>
<h2>Tips</h2>
<ul>
<li>
Always keep moving and jumping to make yourself harder to hit.
</li>
<li>
Weapons often has a secondary action. Use the right-mouse button to use it.
</li>
<li>
Gather as much health and armour as you can.
</li>
</ul>
<h2>Connecting</h2>
<p>
Go to &quot;Multiplayer&quot; and click on the &quot;Profile&quot;
button to set your in-game name.
</p>
<p>
To connect to the game server, click on the &quot;Servers&quot;
button. At the bottom of the screen you can fill in <span class="fw-bold">{{ site.content.domain_name }}</span> in
the Address field. Then press Join.
</p>
<img src="assets/img/help_xonotic.png" alt="Server name input in Xonotic" class="img-fluid">

45
website/index.html Normal file
View File

@ -0,0 +1,45 @@
---
layout: default
nav_pill: home
---
<h1>About onFOSS</h1>
<p>
onFOSS-LAN is a online, "Free (as Freedom) and Open Source" LAN-Party.
</p>
<p>
See the main <a href="https://onfoss.org">onfoss.org</a> website for more information.
You will find our communication channels there as well.
</p>
<h1>Event</h1>
{% assign sitetime = site.time | date: "%FT%T" %}
{% assign event = site.data.events | where_exp: "item", "item.date >= sitetime" | last %}
{% if event %}
<p>Start at <strong>{{ event.date | date: "%A %e %B %Y, %R" }} UTC</strong>
<script>var zone = new Date().toLocaleTimeString('en-ca',{timeZoneName:'short'}).split(' ')[2];d=new Date("{{ event.date | date_to_rfc822 }}");document.writeln(" (Local time: "+d.toTimeString()+")")</script></p>
<p>Hosted by <strong>{{ site.content.hosted_by_name }}</strong></p>
<h2>Schedule</h2>
{% include event.html %}
{% else %}
<p>No event planned</p>
{% endif %}
<h1>Games</h1>
<p>There are a few game servers running. To connect, simply start the game and connect to this domain. See also the <a href="help.html">Help</a> section for more information.</p>
<table class="table">
<tbody>
{% assign sorted_games = site.data.games | sort: "title" %}
{% for game in sorted_games %}
<tr>
<td><a href="help_{{ game.name }}.html"><img src="assets/img/{{ game.name }}.png" height="64" alt="Tiny screenshot of {{ game.title }}"></a></td>
<td>{{ game.title }}</td>
<td>
{{ game.description }}
{% if game.warning %}
<br><mark>Warning:</mark> {{ game.warning }}
{% endif %}
</td>
<td><a href="help_{{ game.name }}.html">More info</a></td>
</tr>
{% endfor %}
</tbody>
</table>
<p>Enjoy!</p>

Some files were not shown because too many files have changed in this diff Show More