SuperTuxKart
Egg for hosting a SuperTuxKart Server.
Ports
Add an allocation on the node for each port.
- Game 2759
Install
- Installer image
- ghcr.io/ptero-eggs/installers:debian
- Install script
- 55 lines
Image
- Debian ghcr.io/ptero-eggs/yolks:debian
Startup
The Panel runs this command to start the server. It replaces each variable in the command with the value of that variable.
6 variables
Startup command
./bin/supertuxkart --server-config=config.xml --lan-server=Pterodactyl_Server --network-console --port="2759" --difficulty=0 --mode=0 --max-players=8 --motd="{{MOTD}}"Dotted values come from the server settings. These values are examples.
The Name of the Server
SERVER_NAMEUsers can edit
required|string|max:50
Name of the Config File.
CONFIG_NAMEUsers can edit
required|regex:/^([\w\d._-]+)(\.xml)$/
0 = Normal Race 1 = Time Trial 2 = Battle 3 = Soccer 4 = Follow The Leader 5 = Capture the Flag
MODEUsers can edit
required|string|in:0,1,2,3,4,5
Speed of the carts and AI difficulty 0 = Beginner 1 = Intermediate 2 = Expert 3 = SuperTux
DIFFICULTYUsers can edit
required|string|in:0,1,2,3
How many players can there be in the server.
MAX_PLAYERSUsers can edit
required|numeric|between:1,24
Message of the Day displayed in the server.
MOTDUsers can edit
required|string|max:100A value is required.
Wings
- Stop command
- quit
- Running when the console shows
- Available command:
Readme
SuperTuxKart
SuperTuxKart is a 3D open-source arcade racer with a variety characters, tracks, and modes to play.
Documentation
Essentially this is a standard build of the regular SuperTuxKart client but with a special flag when being compiled that produces a GUI-less binary optimized for size and memory usage.
Install notes
First install will take a while because the games source code and assets will be downloaded and the games executable will have to be compiled.
Installation/System Requirements
| Bare Minimum | Recommended | |
|---|---|---|
| RAM | 1GiB | 1GiB |
| Storage | 3GiB | 5GiB |
Server Ports
| Port | default |
|---|---|
| Game | 2759 |
Notes
To change server settings, stop the server then edit the 'config.xml' file in the root of the container. When done save the file and start the server.
2759 is the default port, but any port can be used. You will have to manually change it in the config.xml file.
To update the server (only should have to be done when the games code or assets are updated) in panel as an admin go to Servers > SuperTuxKart Server > Manage > Reinstall. If you are a standard user go to SuperTuxKart Server > Settings > Reinstall Server. This will download the updated code/assets (should exclude anything that didn't change) and recompile the executable.
Currently this is setup to run a local lan server. To make this a wan server (available in the SuperTuxKart online lobby list) read the document at this link and make the necessary changes to the startup command.
Problem with this egg?
Open an issue on GitHub. Include your Panel and Wings versions.
Install script 55 lines bash in ghcr.io/ptero-eggs/installers:debian Show Hide
#!/bin/bash
# Install build tools
echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list && \
apt-get update && apt-get -y full-upgrade && \
apt-get install -y build-essential cmake libbluetooth-dev libsdl2-dev \
libcurl4-openssl-dev libenet-dev libfreetype6-dev libharfbuzz-dev \
libjpeg-dev libogg-dev libopenal-dev libpng-dev \
libssl-dev libvorbis-dev libmbedtls-dev pkg-config zlib1g-dev subversion
if [ ! -d "/mnt/server/stk-code" ] && [ ! -d "/mnt/server/stk-assets" ]; then
#clone code repo
git clone https://github.com/supertuxkart/stk-code /mnt/server/stk-code
#get assets
svn co https://svn.code.sf.net/p/supertuxkart/code/stk-assets /mnt/server/stk-assets
# go into the stk-code directory
cd /mnt/server/stk-code
# create and enter the cmake_build directory
mkdir cmake_build
else
#update existing stuff
cd /mnt/server/stk-assets
svn up
cd /mnt/server/stk-code
git pull
fi
#build the server
cd cmake_build
cmake .. -DSERVER_ONLY=ON
make
#copy binary to root/bin and make it executable
mkdir /mnt/server/bin
cp /mnt/server/stk-code/cmake_build/bin/supertuxkart /mnt/server/bin/supertuxkart
chmod +x /mnt/server/bin/supertuxkart
#copy data folder
cp -r /mnt/server/stk-code/data /mnt/server/data
#copy extra assets to data folder
cd /mnt/server/stk-assets
cp -r library models music sfx textures tracks karts /mnt/server/data/
# Delete repo's to save disk space.
#rm -rf /mnt/server/stk-code && rm -rf /mnt/server/stk-assets