Sonic Robo Blast 2

games
Report Issue

Sonic Robo Blast 2 Dedicated Server

Contributors:
README

Sonic Robo Blast 2

SRB2

Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog fangame built using a modified version of the Doom Legacy port of Doom. SRB2 is closely inspired by the original Sonic games from the Sega Genesis, and attempts to recreate the design in 3D. While SRB2 isn't fully completed, it already features tons of levels, enemies, speed, and quite a lot of the fun that the original Sonic games provided.

Server Ports

Port default
Game 5029
Docker Images (1)
Name Image
ghcr.io/ptero-eggs/yolks:wine_latest ghcr.io/ptero-eggs/yolks:wine_latest
Startup Command
rm ./latest-log.txt; wine ./srb2win.exe -dedicated -port {{SERVER_PORT}} -room {{ROOM_NR}} & ENS_PID=$! ; tail -c0 -F ./latest-log.txt --pid=$ENS_PID
Variables (8)

Server name

The name of your server (this will show in the master list)

Environment:
SRV_NAME
Default:
Default Name
User Viewable:
User Editable:
Rules:
required|string|max:20

Password

The password used for joining the server

Environment:
SRV_PW
Default:
ChangeMe
User Viewable:
User Editable:
Rules:
required|string|max:20

Max Players

The amount of players that can join your server at once Maximum amount of players: 32

Environment:
MAX_PLAYERS
Default:
32
User Viewable:
User Editable:
Rules:
required|string|max:32

Master List Room Number

This advertises the server on the Master Server. ID specifies the room in which the server is hosted: 33 is the Standard room, while 28 is the Casual room. Master List: https://ms.srb2.org/

Environment:
ROOM_NR
Default:
33
User Viewable:
User Editable:
Rules:
required|string|max:20

SRB2 Version

The version of Sonic Robo Blast 2 that will be used

Environment:
SRB2_VERSION
Default:
2.2.15
User Viewable:
User Editable:
Rules:
required|string|max:20

WINEDEBUG

Used to suppress WINE FIXME messages. Rarely needs to be changed.

Environment:
WINEDEBUG
Default:
-all
User Viewable:
User Editable:
Rules:
string|nullable

WINEARCH

Used for compatibility. Cannot be changed.

Environment:
WINEARCH
Default:
win64
User Viewable:
User Editable:
Rules:
required|string|in:win64

WINEPATH

Used for compatibility. Cannot be changed.

Environment:
WINEPATH
Default:
/home/container
User Viewable:
User Editable:
Rules:
required|string|in:/home/container
Installation Script
Container: ghcr.io/ptero-eggs/installers:debian
Entrypoint: bash
#!/bin/bash

# SRB2_VERSION
if [[ "$SRB2_VERSION" == "latest" ]]; then
    echo "Fetching latest SRB2 version from GitHub..."
    SRB2_VERSION=$(curl -s https://api.github.com/repos/STJr/SRB2/releases/latest | jq -r '.tag_name' | sed 's/SRB2_release_//')
    echo "Latest SRB2 version is: $SRB2_VERSION"
fi

SRB2_VERSION_NO_DOTS="${SRB2_VERSION//./}"
SRB2_URL="https://github.com/STJr/SRB2/releases/download/SRB2_release_${SRB2_VERSION}/SRB2-v${SRB2_VERSION_NO_DOTS}-Full.zip"

apt update && apt install -y unzip wget jq curl libsdl2-2.0-0 libpng16-16

mkdir -p /mnt/server
cd /mnt/server || exit

wget -O SRB2.zip "$SRB2_URL"
unzip SRB2.zip
rm SRB2.zip

chmod +x ./srb2win.exe

CONFIG_FILE="/mnt/server/adedserv.cfg"

if [[ -f "$CONFIG_FILE" ]]; then
    echo "Ensuring necessary settings exist in configuration..."
    sed -i "s/^servername.*/servername ${SRV_NAME}/" "$CONFIG_FILE"
    sed -i "s/^password.*/password ${SRV_PW}/" "$CONFIG_FILE"
    sed -i "s/^maxplayers.*/maxplayers ${MAX_PLAYERS}/" "$CONFIG_FILE"
else
    echo "Configuration file missing! Creating a new one..."
    cat > "$CONFIG_FILE" <<EOL
servername "${SRV_NAME:-"My SRB2 Server"}"
wait 5
password ${SRV_PW:-"ChangeMe"}
wait 5
maxplayers ${MAX_PLAYERS:-20}
EOL
fi

echo -e "-------------------------------------------------"
echo -e "Installation completed for SRB2 $SRB2_VERSION"
echo -e "-------------------------------------------------"