Add Odamex

This commit is contained in:
DeathByDenim 2022-12-04 16:04:16 -05:00
parent bf14133b13
commit d71f8fa743
Signed by: DeathByDenim
GPG Key ID: 89185F675E0AB7D5
6 changed files with 150 additions and 0 deletions

View File

@ -37,6 +37,7 @@ fi
export stk_version="latest"
export bzflag_version="2.4"
export mindustry_version="latest"
export odamex_version="10.2.0"
export openhv_version="latest"
export teeworlds_version="latest"
export teeworldsddrace_version="16.1"
@ -94,6 +95,7 @@ cp console2web/console2web.py /usr/bin/console2web
"$(dirname "$0")"/scripts/deploy_hedgewars.sh
"$(dirname "$0")"/scripts/deploy_lix.sh
"$(dirname "$0")"/scripts/deploy_mindustry.sh
"$(dirname "$0")"/scripts/deploy_odamex.sh
"$(dirname "$0")"/scripts/deploy_openhv.sh
"$(dirname "$0")"/scripts/deploy_openspades.sh
"$(dirname "$0")"/scripts/deploy_teeworlds.sh

82
scripts/deploy_odamex.sh Executable file
View File

@ -0,0 +1,82 @@
#!/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
# Install ODAMEX
apt install --assume-yes libsdl2-dev libsdl2-mixer-dev cmake deutex freedoom
mkdir -p ${TMPDIR:-/tmp}/odamex-build
curl --location https://downloads.sourceforge.net/project/odamex/Odamex/${odamex_version}/odamex-src-${odamex_version}.tar.xz | tar --extract --xz --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_LAUNCHER=OFF -DCMAKE_INSTALL_PREFIX=/opt/odamex-${odamex_version} ..
make
make install
cd -
rm -rf ${TMPDIR:-/tmp}/odamex-build
# Ugh, these links expire. Always need to download manually
# if curl --location 'https://www.moddb.com/downloads/mirror/189782/123/ec702ae81b867d6096c396335fbff692/?referer=https%3A%2F%2Fwww.moddb.com%2Fmods%2Fdoom-christmas-for-doom-ii-final-doom' > ${TMPDIR:-/tmp}/doomxmas.zip; then
# unzip -o -d /usr/share/games/doom/ ${TMPDIR:-/tmp}/doomxmas.zip
# fi
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 "5"
set sv_maxplayers "32"
set sv_monstersrespawn 1
set sv_warmup 1
set sv_countdown 5
wad doomxmas.wad
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
systemctl daemon-reload
systemctl enable --now odamex.service
# Add firewall rules
firewall-cmd --zone=public --add-port=10666/udp --permanent

View File

@ -109,6 +109,7 @@
<li><a href="help_hedgewars.html">Hedgewars</a></li>
<li><a href="help_lix.html">Lix</a></li>
<li><a href="help_mindustry.html">Mindustry</a></li>
<li><a href="help_odamex.html">Odamex</a></li>
<li><a href="help_openhv.html">OpenHV</a></li>
<li><a href="help_openspades.html">OpenSpades</a></li>
<li><a href="help_shatteredparadise.html">Shattered Paradise</a></li>

59
website/help_odamex.html Normal file
View File

@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Game server</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/serverstats.css">
<link rel="stylesheet" href="css/help.css">
<link rel="icon" href="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>
<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="img/blackmage.svg" alt="Site icon">
<span class="fs-4">onFOSS-LAN hosted by HOSTEDBYNAME</span>
</a>
<ul class="nav nav-pills">
<li class="nav-item"><a href="index.html" class="nav-link" aria-current="page">Home</a></li>
<li class="nav-item"><a href="tournament.html" class="nav-link">Tournament</a></li>
<li class="nav-item"><a href="schedule.html" class="nav-link">Schedule</a></li>
<li class="nav-item"><a href="help.html" class="nav-link active">Help</a></li>
<li class="nav-item"><a href="admin.html" class="nav-link">Admin</a></li>
</ul>
</header>
</nav>
<div class="container">
<div class="row">
<div class="col-md-8">
<h1>Odamex</h1>
<p>Multiplayer-focused DOOM engine that allows deathmatch, coop, and capture the flag mode. Here we are using the <a href="https://freedoom.github.io/">Freedom</a> assets so you don't need a copy of the original game to play.</p>
<img src="img/odamex.png" alt="Screenshot of Odamex">
<h2>Getting the game</h2>
<div class="download"><a href="https://odamex.net/">DOWNLOAD</a></div>
<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 DOMAINNAME +set cl_name "YourName"</tt></p>
<p>Of course, substitute &quot;YourName&quot; with the in-game name you want.</p>
</div>
<div class="col-6 col-md-4">
<h5>Live stats</h5>
SERVERSTATE
</div>
</div>
</div>
</body>
</html>

BIN
website/img/odamex.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

View File

@ -84,6 +84,12 @@
<td>A building and tower defence game where you build up an industry and defences against ever larger waves of enemies.</td>
<td><a href="help_mindustry.html">More info</a></td>
</tr>
<tr>
<td><a href="help_odamex.html"><img src="img/odamex.png" height="64" alt="Tiny screenshot of Odamex"></a></td>
<td>Odamex</td>
<td>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.</td>
<td><a href="help_odamex.html">More info</a></td>
</tr>
<tr>
<td><a href="help_openhv.html"><img src="img/openhv.png" height="64" alt="Tiny screenshot of OpenHV"></a></td>
<td>OpenHV</td>