diff --git a/.gitignore b/.gitignore
index c7038cd..03eedc8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/README.md b/README.md
index f1b9f11..16b36ef 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,83 @@
-# Gameserver
+# Game server
-The official general gameserver repository for onFOSS events.
\ No newline at end of file
+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)
diff --git a/configs/supertuxkart.xml b/configs/supertuxkart.xml
new file mode 100644
index 0000000..75be701
--- /dev/null
+++ b/configs/supertuxkart.xml
@@ -0,0 +1,170 @@
+
+
+ UPDATE (2022-03-08): 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. +
++ UPDATE (2022-03-13): Canada increased the limit to $30M, so + any donation you make is once again tripled. +
++ UPDATE (2022-03-14): Oh, never mind, this goal has already + been reached. Anyway, I'll still match what you donate! +
++ UPDATE (2022-03-19): Donations are closed. A total amount + of €40 was collected and the equivalent of CAD 55.64 was + donated to the Canadian Red Cross. +
+List of donations:
+{{ game.description }}
+ +{{ page.date | date_to_string }} - {{ page.author }}
+ +{{ content }} diff --git a/website/_posts/2023-05-06-more-bananas.md b/website/_posts/2023-05-06-more-bananas.md new file mode 100644 index 0000000..70341c6 --- /dev/null +++ b/website/_posts/2023-05-06-more-bananas.md @@ -0,0 +1,6 @@ +--- +author: DeathByDenim +--- +Hello world! + +How are you doing today? diff --git a/website/_posts/2023-05-08-bananas.md b/website/_posts/2023-05-08-bananas.md new file mode 100644 index 0000000..70341c6 --- /dev/null +++ b/website/_posts/2023-05-08-bananas.md @@ -0,0 +1,6 @@ +--- +author: DeathByDenim +--- +Hello world! + +How are you doing today? diff --git a/website/_sass/base.scss b/website/_sass/base.scss new file mode 100644 index 0000000..cde9996 --- /dev/null +++ b/website/_sass/base.scss @@ -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 */ +//} diff --git a/website/admin.html b/website/admin.html new file mode 100644 index 0000000..da466f6 --- /dev/null +++ b/website/admin.html @@ -0,0 +1,10 @@ +--- +layout: default +nav_pill: admin +--- + + + +Each game has their own separate help page
++ Use the arrow keys to nagivate to Play Game and press <Enter>. + Then go to Multiplayer and then to Custom Connect. +
++ Enter {{ site.content.domain_name }} in the Address field and keep the port number at 4534. + Navigate down to Connect to Server to join. +
+You should now be connected.
diff --git a/website/help_bzflag.html b/website/help_bzflag.html new file mode 100644 index 0000000..f729933 --- /dev/null +++ b/website/help_bzflag.html @@ -0,0 +1,18 @@ +--- +layout: help +game: bzflag +--- +Use the arrow keys to nagivate to Join Game and press <Enter>.
++ Move down to Server and type {{ site.content.domain_name }} and keep the port number at 5154. + You can also set your Callsign here. This is how other players will see + your name. Then move up to Connect and press <Enter>.
+ +You should now be connected.
diff --git a/website/help_hedgewars.html b/website/help_hedgewars.html new file mode 100644 index 0000000..0cc2a1d --- /dev/null +++ b/website/help_hedgewars.html @@ -0,0 +1,34 @@ +--- +layout: help +game: hedgewars +--- ++ 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. +
++ 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 + "Play local network game". A new screen will open up. +
++ At the bottom, there is a button called "Specify addres". + Fill in {{ site.content.domain_name }} for the host and leave the port number at 46631. +
+ ++ You should now see a list of rooms. There should be one room you can join. +
diff --git a/website/help_lix.html b/website/help_lix.html new file mode 100644 index 0000000..67ca4a4 --- /dev/null +++ b/website/help_lix.html @@ -0,0 +1,17 @@ +--- +layout: help +game: lix +--- +Click on "Options". Then under the "General" tab, you can input your player name. Click on "Okay" to confirm.
+Click on "Network Game".
+Under address, fill out {{ site.content.domain_name }} and keep the port set to 22934. Then click on "Okay" to connect.
+You should see a room on the upper right. Click on that to join.
+Choose your colour and then click "Okay"
diff --git a/website/help_mindustry.html b/website/help_mindustry.html new file mode 100644 index 0000000..e8c4cff --- /dev/null +++ b/website/help_mindustry.html @@ -0,0 +1,22 @@ +--- +layout: help +game: mindustry +--- ++ From the main menu choose "Play" and then "Join + Game". You will be able to set you in-game name here. +
+To join the server, click on "Add Server" and type in {{ site.content.domain_name }}. When you press Ok, it will be added under "Remote Servers".
+ +You can then click on the server name to join.
diff --git a/website/help_minetest.html b/website/help_minetest.html new file mode 100644 index 0000000..4dadfa6 --- /dev/null +++ b/website/help_minetest.html @@ -0,0 +1,19 @@ +--- +layout: help +game: minetest +--- ++ Under address fill in {{ site.content.domain_name }} and keep the port at + 30000. Click on Register to set your in-game name. You can leave the password blank + since this server will disappear after the event anyway. +
+ +You will be placed in the lobby with the other players
diff --git a/website/help_odamex.html b/website/help_odamex.html new file mode 100644 index 0000000..d334e10 --- /dev/null +++ b/website/help_odamex.html @@ -0,0 +1,17 @@ +--- +layout: help +game: odamex +download_link: https://odamex.net/ +--- +An AppImage for Linux was automatically generated: {% if site.content.offline %}Odamex-x86_64.AppImage (only available when game servers are online){% else %}Odamex-x86_64.AppImage{% endif %}
+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.
+However, if you connect to the game server directly, odamex will download the required assets automatically from the server.
+From the terminal, type:
+odamex -connect {{ site.content.domain_name }} +set cl_name "YourName"
+Of course, substitute "YourName" with the in-game name you want.
diff --git a/website/help_openhv.html b/website/help_openhv.html new file mode 100644 index 0000000..2fc9902 --- /dev/null +++ b/website/help_openhv.html @@ -0,0 +1,30 @@ +--- +layout: help +game: openhv +--- +You will have to expand "Assets" to see the download links.
++ To set your in-game name, click on "Settings". You'll be + able to set your name under "Player Name". +
++ From the main menu, click on "Multiplayer" and then click + on "Direct IP". Fill in {{ site.content.domain_name }} and keep the port at + 1234. Then click on "Join" +
+ +You will be placed in the lobby with the other players
diff --git a/website/help_opensoldat.html b/website/help_opensoldat.html new file mode 100644 index 0000000..f9ba1be --- /dev/null +++ b/website/help_opensoldat.html @@ -0,0 +1,20 @@ +--- +layout: help +game: opensoldat +--- +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.
+The AppImage for Linux creates the config file in ~/.config/share/Soldat/Soldat instead.
+Things you might like to set:
+Start Soldat by typing:
+./soldat -join {{ site.content.domain_name }}
+You should now be connected. If it doesn't work. Try to connect by IP address instead of domain name.
diff --git a/website/help_openspades.html b/website/help_openspades.html new file mode 100644 index 0000000..c7435f0 --- /dev/null +++ b/website/help_openspades.html @@ -0,0 +1,53 @@ +--- +layout: help +game: openspades +--- ++ 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. +
++ 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. +
++ When you start the game you will immediately enter the server + browser. If you click on "Setup" at the bottom of the + screen, you can set your in-game name. Click on "Back" + to return to the server browser. +
++ To connect to the server, type {{ site.content.domain_name }} in the input field at the + top and click on the "Connect" button to the right. +
+ + diff --git a/website/help_shatteredparadise.html b/website/help_shatteredparadise.html new file mode 100644 index 0000000..98738ba --- /dev/null +++ b/website/help_shatteredparadise.html @@ -0,0 +1,30 @@ +--- +layout: help +game: shatteredparadise +--- +You will have to expand "Assets" to see the download links.
++ To set your in-game name, click on "Settings". You'll be + able to set your name under "Player Name". +
++ From the main menu, click on "Multiplayer" and then click + on "Direct IP". Fill in {{ site.content.domain_name }} and set the port at + 12340. The standard port is 1234, but is already taken. Then click on "Join" +
+ +You will be placed in the lobby with the other players
diff --git a/website/help_supertuxkart.html b/website/help_supertuxkart.html new file mode 100644 index 0000000..371e581 --- /dev/null +++ b/website/help_supertuxkart.html @@ -0,0 +1,28 @@ +--- +layout: help +game: supertuxkart +--- ++ Click on the globe labelled "Online". 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. +
++ To connect to our server, click on "Enter server address". + Then type in {{ site.content.domain_name }} and click on "OK". +
+ ++ You will then be placed in the lobby of our game server and ready to go! +
diff --git a/website/help_supertuxparty.html b/website/help_supertuxparty.html new file mode 100644 index 0000000..f5ab9e9 --- /dev/null +++ b/website/help_supertuxparty.html @@ -0,0 +1,4 @@ +--- +layout: help +game: supertuxparty +--- diff --git a/website/help_teeworlds.html b/website/help_teeworlds.html new file mode 100644 index 0000000..be824bf --- /dev/null +++ b/website/help_teeworlds.html @@ -0,0 +1,17 @@ +--- +layout: help +game: teeworlds +--- +Click the name of your OS on the left of the most recent version. Extract the file wherever you like and start playing.
+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.
+ +To connect to the server, got back to the main menu and click Play.
+At the bottom of the screen you can fill in the name of the server in the Host address field. Type {{ site.content.domain_name }} and press <Enter> or click Connect.
+ +You should now be connected.
diff --git a/website/help_ufoai.html b/website/help_ufoai.html new file mode 100644 index 0000000..786e18c --- /dev/null +++ b/website/help_ufoai.html @@ -0,0 +1,25 @@ +--- +layout: help +game: ufoai +--- +The download page only has binaries for Linux and Windows. We compiled the macOS version ourselves. Download: ufoai-macos.tar.bz2
+Then open the Terminal and type the following:
++tar xf ufoai-macos.tar.bz2 +cd dist +./ufo ++
To get rid of the graphical glitches disable "GLSL Shaders" under Options → Video → Advanced → OpenGL Setting
+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.
+ +Click no the done button at the very bottom right if you are happy with it. You'll return to the multiplayer menu
+Click on Join and type {{ site.content.domain_name }} in the field for Connect to IP and click Connect.
+ +You'll see a summary of the server. Click on Connect to connect.
diff --git a/website/help_unvanquished.html b/website/help_unvanquished.html new file mode 100644 index 0000000..f08b802 --- /dev/null +++ b/website/help_unvanquished.html @@ -0,0 +1,20 @@ +--- +layout: help +game: unvanquished +--- +Set your in-game name by clicking on "Player" under "Options".
+To connect to the server, press ~ to open the console and type "connect {{ site.content.domain_name }}"
+ diff --git a/website/help_xonotic.html b/website/help_xonotic.html new file mode 100644 index 0000000..5d53cf0 --- /dev/null +++ b/website/help_xonotic.html @@ -0,0 +1,28 @@ +--- +layout: help +game: xonotic +--- +Note that the download has the executable for all OS inside of it.
++ Go to "Multiplayer" and click on the "Profile" + button to set your in-game name. +
++ To connect to the game server, click on the "Servers" + button. At the bottom of the screen you can fill in {{ site.content.domain_name }} in + the Address field. Then press Join. +
+ diff --git a/website/index.html b/website/index.html new file mode 100644 index 0000000..bbcd11f --- /dev/null +++ b/website/index.html @@ -0,0 +1,45 @@ +--- +layout: default +nav_pill: home +--- ++ onFOSS-LAN is a online, "Free (as Freedom) and Open Source" LAN-Party. +
++ See the main onfoss.org website for more information. + You will find our communication channels there as well. +
+Start at {{ event.date | date: "%A %e %B %Y, %R" }} UTC +
+Hosted by {{ site.content.hosted_by_name }}
+No event planned
+ {% endif %} +There are a few game servers running. To connect, simply start the game and connect to this domain. See also the Help section for more information.
++ | {{ game.title }} | +
+ {{ game.description }}
+ {% if game.warning %}
+ Warning: {{ game.warning }} + {% endif %} + |
+ More info | +
Enjoy!
diff --git a/website/js/consoles.js b/website/js/consoles.js new file mode 100644 index 0000000..cd74f0d --- /dev/null +++ b/website/js/consoles.js @@ -0,0 +1,150 @@ +--- +--- +// 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, seeNo upcoming events scheduled
+ {% endfor %} +There will be a tournament for the next event on {{ nextevent.date | date: "%a, %b %d, %Y" }}
+No tournaments have been planned for the next event.
+ {% endif %} +By joining the tournament you accept following rules:
+The most important rule is: HAVE FUN! Surely, the tournament is competitive, however, don't forget why we are all here - to have fun playing games together!
+If you cheat you will get banned from this and all upcoming tournaments! Cheating is: manipulating the game for your advantage. So any third-party tool that helps you is not allowed! Due to the blessing that FOSS games can be modified, modifications that give you an advantage are also considered cheating! So use the official binaries to play the tournament! If no binaries are available and you have to compile it on your own you are not allowed to modify the source. If there is any confusion contact us in advance and we will find a solution.
+Griefers are going to be kicked immediately and if it happens frequently you will get banned from upcoming tournaments. We are all human beings and hopefully capable of being nice to each other! So respect each other and there will not be any problems!
+Leaving the tournament while it is still ongoing while you still have rounds to play is also not very nice.