aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Stück <adam@adast.xyz>2023-12-17 19:54:39 +0100
committerAdam Stück <adam@adast.xyz>2023-12-17 20:56:00 +0100
commit267ce378e2cdfb1e72dcfcd05c8d4b69da9c79cb (patch)
tree3616fba7a5550068ec33ded9318d4d51098917a4
parent5aa9d9038919533481e10976f3f7f9c90531a81a (diff)
overhaul: switch from ssg to barf
-rw-r--r--.build.yml6
-rw-r--r--.gitignore1
-rw-r--r--Makefile13
-rw-r--r--README.md2
-rwxr-xr-xbarf105
-rw-r--r--build/atom.xml10
-rw-r--r--build/favicon.icobin46927 -> 0 bytes
-rw-r--r--build/index.html92
-rw-r--r--build/main.css90
-rw-r--r--build/pages.tsv0
-rw-r--r--build/posts.tsv0
-rw-r--r--build/rss.xml39
-rw-r--r--build/sitemap.xml8
-rw-r--r--footer.html16
-rw-r--r--header.html16
-rw-r--r--index.md33
-rw-r--r--src/_footer.html11
-rw-r--r--src/_header.html17
-rw-r--r--src/favicon.icobin46927 -> 0 bytes
-rw-r--r--src/index.md29
-rw-r--r--src/main.css90
-rw-r--r--src/rss.xml39
-rwxr-xr-xssg243
23 files changed, 244 insertions, 616 deletions
diff --git a/.build.yml b/.build.yml
index 68c0e76..15983b6 100644
--- a/.build.yml
+++ b/.build.yml
@@ -2,13 +2,11 @@ image: alpine/edge
oauth: pages.sr.ht/PAGES:RW
packages:
- hut
-- lowdown
environment:
site: arena.adast.dk
tasks:
- package: |
- cd arena-web
- ./ssg src/ build/ arena https://$site
- tar -C build -cvz . > ../site.tar.gz
+ cd arena-web/build
+ tar -cvz . > ../../site.tar.gz
- upload: |
hut pages publish -d $site site.tar.gz
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index fc83353..0000000
--- a/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-build/.files
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b16a580
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,13 @@
+build:
+ sh ./barf
+ rsync -r public/ build/public
+
+clean:
+ rm -rf build/*
+
+watch:
+ while true; do \
+ ls -d .git/* * posts/* pages/* header.html | entr -cd make ;\
+ done
+
+.PHONY: build clean watch
diff --git a/README.md b/README.md
index 00ff290..f15e4d8 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# arena-web
-Sources for [arena.adast.dk](https://arena.adast.dk), built with [ssg](https://rgz.ee/ssg.html).
+Sources for [arena.adast.dk](https://arena.adast.dk), built with [barf](https://barf.bt.ht).
[[project home]](https://sr.ht/~adamski/arena/)
diff --git a/barf b/barf
new file mode 100755
index 0000000..81bbcd2
--- /dev/null
+++ b/barf
@@ -0,0 +1,105 @@
+#!/bin/sh
+set -eu
+MARKDOWN=smu
+IFS=' '
+
+# Create tab separated file with filename, title, creation date, last update
+index_tsv() {
+ for f in "$1"/*.md
+ do
+ title=$(sed -n '/^# /{s/# //p; q}' "$f")
+ printf '%s\t%s\t%s\t%s\n' "$f" "${title:="No Title"}"
+ done
+}
+
+index_html() {
+ # Print header
+ title=$(sed -n '/^# /{s/# //p; q}' index.md)
+ sed "s/{{TITLE}}/$title/" header.html
+
+ # Intro text
+ $MARKDOWN index.md
+
+ echo "<ul>"
+
+ # Posts
+ while read -r f title created; do
+ link=$(echo "$f" | sed -E 's|.*/(.*).md|\1/|')
+ created=$(echo $(head -3 "$f" | tail -1))
+ echo "<li>$created &middot; <a href=\"$link\">$title</a></li>"
+ done < "$1" | sort -r
+
+ echo "</ul>"
+
+ # Print footer after post list
+ cat footer.html
+}
+
+atom_xml() {
+ uri=$(sed -rn '/atom.xml/ s/.*href="([^"]*)".*/\1/ p' header.html)
+ domain=$(echo "$uri" | sed 's/atom.xml//g' | sed 's|/[^/]*$||')
+ first_commit_date=$(git log --pretty='format:%ai' . | cut -d ' ' -f1 | tail -1)
+
+ cat <<EOF
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <title>$(sed -n '/^# /{s/# //p; q}' index.md)</title>
+ <link href="$domain/atom.xml" rel="self" />
+ <updated>$(date +%FT%TZ)</updated>
+ <author>
+ <name>$(git config user.name)</name>
+ </author>
+ <id>$domain,$first_commit_date:default-atom-feed/</id>
+EOF
+
+ while read -r f title created; do
+
+ content=$($MARKDOWN "$f" | sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s/"/\&quot;/g; s/'"'"'/\&#39;/g')
+ post_link=$(echo "$f" | sed -E 's|posts/(.*).md|\1|')
+ basic_date=$(echo $(head -3 "$f" | tail -1))
+ published_date=$(date -d $basic_date -u +%Y-%m-%dT10:%M:%SZ)
+
+ cat <<EOF
+ <entry>
+ <title>$title</title>
+ <content type="html">$content</content>
+ <link href="$domain/$post_link"/>
+ <id>$domain/$post_link</id>
+ <updated>$published_date</updated>
+ <published>$published_date</published>
+ </entry>
+EOF
+ done < "$1"
+
+ echo '</feed>'
+}
+
+write_page() {
+ filename=$1
+ directory=$(echo $(basename "$filename" .md))
+ $(mkdir -p build/$directory)
+ target=$(echo "$filename" | sed -r 's|\w+/(.*).md|build/\1/index.html|')
+ created=$(echo $(head -3 "$filename" | tail -1))
+ title=$2
+
+ $MARKDOWN "$filename" | \
+ cat header.html - |\
+ sed "s|{{TITLE}}|$title|" \
+ > "$target" && cat footer.html >> "$target"
+}
+
+rm -rf build && mkdir build
+
+# Blog posts
+index_tsv posts | sort -rt " " -k 3 > build/posts.tsv
+index_html build/posts.tsv > build/index.html
+atom_xml build/posts.tsv > build/atom.xml
+while read -r f title created; do
+ write_page "$f" "$title" "$created"
+done < build/posts.tsv
+
+# Pages
+index_tsv pages > build/pages.tsv
+while read -r f title created; do
+ write_page "$f" "$title" "$created"
+done < build/pages.tsv
diff --git a/build/atom.xml b/build/atom.xml
new file mode 100644
index 0000000..3bcd04a
--- /dev/null
+++ b/build/atom.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <title>arena: Quake-like multiplayer shooter </title>
+ <link href="https://arena.adast.dk/atom.xml" rel="self" />
+ <updated>2023-12-17T20:55:56Z</updated>
+ <author>
+ <name>Adam Stück</name>
+ </author>
+ <id>https://arena.adast.dk,2022-04-23:default-atom-feed/</id>
+</feed>
diff --git a/build/favicon.ico b/build/favicon.ico
deleted file mode 100644
index d537e87..0000000
--- a/build/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/build/index.html b/build/index.html
index 70b828c..2528cd3 100644
--- a/build/index.html
+++ b/build/index.html
@@ -1,34 +1,34 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>arena: Quake-like multiplayer shooter</title>
- <link rel="icon" type="image/x-icon" href="/favicon.ico">
- <link rel="alternate" type="application/rss+xml" title="" href='feed'>
- <link rel="stylesheet" type="text/css" href="/main.css">
- </head>
- <body>
- <header>
- <nav>
- <a href="/">Home</a><span> | </span>
- <a href="/rss.xml">RSS</a>
- </nav>
- </header><main>
-<h1 id="arena-quake-like-multiplayer-shooter">arena: Quake-like multiplayer shooter</h1>
+<!doctype html>
+<html lang="en" id="top">
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="icon" href="data:,">
+ <title>arena: Quake-like multiplayer shooter </title>
+ <link href="https://arena.adast.dk/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
+ <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}table{text-align:left;width:100%;}</style>
+</head>
-<p>2021-05-07</p>
+<nav>
+ <a href="#menu">Menu &darr;</a>
+</nav>
-<blockquote>
-<p>TODO: Update post!</p>
+<main>
+<h1>arena: Quake-like multiplayer shooter </h1>
+<blockquote><p><strong>arena</strong> is currently on hiatus. I am hoping to do a
+complete open-source rewrite using the <a href="https://godotengine.org">Godot game
+engine</a>.<br>
+~ <em>2023-12-17</em></p>
</blockquote>
-
-<p>Aftershock (working title) is a multiplayer old-school arena shooter being made in Unity. It&#8217;s a hobby project that I have been working on since 2016. It started as a <em>warmup</em> project before jumping into developing an MMO, but I have since learned how much work goes into making just a multiplayer fps. Especially as a solo project. </p>
-
-<p>At it&#8217;s core, Aftershock is supposed to be my attempt at recreating a mix of Quake 3 &#47; Quake Live along with whatever else I decide to add. </p>
-
+<p><strong>arena</strong> (working title) is a multiplayer old-school arena shooter being made
+by me, <a href="https://adast.dk">Adam Stück</a>, with the Unity game engine. It's a hobby
+project that I have been working on since 2016. It started as a <em>warmup</em>
+project before jumping into developing an MMO, but I have since learned how
+much work goes into making just a multiplayer fps. Especially as a solo
+project. </p>
+<p>At it's core, <strong>arena</strong> is supposed to be my attempt at recreating a mix of
+Quake 3 / Quake Live along with whatever else I decide to add. </p>
<p>Main features (so far):</p>
-
<ul>
<li>p2p multiplayer</li>
<li>support for custom maps</li>
@@ -37,25 +37,29 @@
<li>health pickups</li>
<li>3 gamemodes (FFA, TDM, Race)</li>
</ul>
-
-<p>I&#8217;m in the process of rewriting a lot of systems in the game at the moment because I&#8217;m switching from janky p2p multiplayer to an authoritative server setup with client-side prediction <a href="https://www.gabrielgambetta.com/client-server-game-architecture.html">(more)</a>.</p>
-
-<p>&#10148;&#8194;<a href="https://tv.adast.dk/c/arena/videos">Gameplay clips</a><br/>
-&#10148;&#8194;<a href="https://trello.com/b/ycQyrouQ">Follow my progress</a></p>
-
-<hr style="border-top: dotted 1px;" />
-
-<p>Have a comment on one of my posts? Start a discussion in <a href="https://lists.sr.ht/~adamski/public-inbox">my public inbox</a> by
-sending an email to <a href="mailto:~adamski/public-inbox@lists.sr.ht">~adamski&#47;public-inbox@lists.sr.ht</a> [<a href="https://man.sr.ht/lists.sr.ht/etiquette.md">mailing list
-etiquette</a>]</p>
+<p>I'm in the process of rewriting a lot of systems in the game at the moment
+because I'm switching from janky p2p multiplayer to an authoritative server
+setup with client-side prediction
+<a href="https://www.gabrielgambetta.com/client-server-game-architecture.html">(more)</a>.</p>
+<ul>
+<li><a href="https://tv.adast.dk/c/arena/videos">Gameplay clips</a></li>
+<li><a href="https://trello.com/b/ycQyrouQ">Follow my progress</a></li>
+</ul>
+<ul>
+</ul>
<footer role="contentinfo">
-
- <span><a href="#">↑ Back to Top</a></span><br><br>
+ <hr>
+ <h3 id="menu">Menu Navigation</h3>
+ <ul>
+ <li><a href="/">Home</a></li>
+ <li><a href="https://tv.adast.dk/c/arena/videos">Videos</a></li>
+ <li><a href="/atom.xml">RSS</a></li>
+ <li><a href="#top">&uarr; Top of the page</a></li>
+ </ul>
<small>
- Built with <a href="https://rgz.ee/ssg.html">ssg</a>.<br>
+ Built with <a href="https://git.sr.ht/~bt/barf">barf</a>. <br>
+ Maintained with ♥ for the web. <br>
+ The content for this site is <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA</a>.<br>
The <a href="https://git.sr.ht/~adamski/arena-web">code for this site</a> is <a href="https://git.sr.ht/~adamski/arena-web/tree/main/item/LICENSE">MIT</a>.
</small>
</footer>
-</main>
-</body>
-</html>
diff --git a/build/main.css b/build/main.css
deleted file mode 100644
index 4d89bb6..0000000
--- a/build/main.css
+++ /dev/null
@@ -1,90 +0,0 @@
-* {
- box-sizing: border-box;
-}
-body {
- font-family: sans-serif;
- line-height: 1.45;
- margin: 0 auto;
- max-width: 45rem;
- padding: 0 15px;
-}
-hr {
- background-color: grey;
- border: 0;
- height: 1px;
- margin: 2rem 0;
-}
-nav {
- margin: 2rem 0 0;
-}
-main p {
- margin: 1rem;
-}
-h1,h2,h3,h4 {
- margin: 2rem 0 0;
-}
-h1 {
- margin-bottom: 0.5rem;
-}
-h1 + p {
- margin: 0 0 1rem;
-}
-span.created {
- display: block;
- margin: 4px 15px;
-}
-img {
- border: 1px solid lightgrey;
- height: auto;
- max-width: 100%;
- width: auto;
-}
-blockquote {
- background-color: linen;
- border-left: 4px solid lightcoral;
- margin: 2rem 0;
- padding: 10px;
-}
-blockquote p {
- margin: 0;
-}
-figure {
- margin: 2rem 0;
-}
-figcaption {
- color: slategrey;
-}
-code {
- background: #eee;
- padding: 0.3rem;
- tab-size: 4;
-}
-pre {
- background: #eee;
-}
-pre code {
- background: none;
- display: block;
- overflow-x: auto;
- padding: 0.3rem 0.6rem;
-}
-table {
- border-collapse: collapse;
- margin: 2rem 0;
- text-align: left;
- width: 100%;
-}
-tr {
- border-bottom: 1px solid lightgrey;
-}
-tr:nth-of-type(odd) td {
- background-color: #f8f8f8;
-}
-th,td {
- padding: 6px;
-}
-footer {
- border-top: 1px dashed grey;
- margin: 2rem 0;
- padding: 1rem 15px;
-}
diff --git a/build/pages.tsv b/build/pages.tsv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/build/pages.tsv
diff --git a/build/posts.tsv b/build/posts.tsv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/build/posts.tsv
diff --git a/build/rss.xml b/build/rss.xml
deleted file mode 100644
index 76dbb16..0000000
--- a/build/rss.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
- <channel>
- <title>adamski's arena</title>
- <link>https://arena.adast.dk/rss.xml</link>
- <description>Updates to the arena project</description>
- <language>en-us</language>
- <atom:link href="https://arena.adast.dk/rss.xml" rel="self" type="application/rss+xml" />
-
-<item>
-<title>arena: Quake-like multiplayer shooter</title>
-<guid>https://arena.adast.dk</guid>
-<link>https://arena.adast.dk</link>
-<pubDate>Tue, 27 Sep 2022 21:15:11 +0200</pubDate>
-<description><![CDATA[<p>Aftershock (working title) is a multiplayer old-school arena shooter being made in Unity. It&#8217;s a hobby project that I have been working on since 2016. It started as a <em>warmup</em> project before jumping into developing an MMO, but I have since learned how much work goes into making just a multiplayer fps. Especially as a solo project. </p>
-
-<p>At it&#8217;s core, Aftershock is supposed to be my attempt at recreating a mix of Quake 3 &#47; Quake Live along with whatever else I decide to add. </p>
-
-<p>Main features (so far):</p>
-
-<ul>
-<li>p2p multiplayer</li>
-<li>support for custom maps</li>
-<li>vq3-like movement</li>
-<li>rocket launcher + rocket jumping</li>
-<li>health pickups</li>
-<li>3 gamemodes (FFA, TDM, Race)</li>
-</ul>
-
-<p>I&#8217;m in the process of rewriting a lot of systems in the game at the moment because I&#8217;m switching from janky p2p multiplayer to an authoritative server setup with client-side prediction <a href="https://www.gabrielgambetta.com/client-server-game-architecture.html">(more)</a>.</p>
-
-<p>&#10148;&#8194;<a href="https://tv.adast.dk/c/arena/videos">Gameplay clips</a><br/>
-&#10148;&#8194;<a href="https://trello.com/b/ycQyrouQ">Follow my progress</a></p>
-]]></description>
-</item>
-
-
- </channel>
-</rss>
diff --git a/build/sitemap.xml b/build/sitemap.xml
deleted file mode 100644
index c536f0a..0000000
--- a/build/sitemap.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<urlset
-xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
-http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
-xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
-<url><loc>https://arena.adast.dk/index.html</loc><lastmod>2023-05-22</lastmod><priority>1.0</priority></url>
-</urlset>
diff --git a/footer.html b/footer.html
new file mode 100644
index 0000000..fcc9ba3
--- /dev/null
+++ b/footer.html
@@ -0,0 +1,16 @@
+<footer role="contentinfo">
+ <hr>
+ <h3 id="menu">Menu Navigation</h3>
+ <ul>
+ <li><a href="/">Home</a></li>
+ <li><a href="https://tv.adast.dk/c/arena/videos">Videos</a></li>
+ <li><a href="/atom.xml">RSS</a></li>
+ <li><a href="#top">&uarr; Top of the page</a></li>
+ </ul>
+ <small>
+ Built with <a href="https://git.sr.ht/~bt/barf">barf</a>. <br>
+ Maintained with ♥ for the web. <br>
+ The content for this site is <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA</a>.<br>
+ The <a href="https://git.sr.ht/~adamski/arena-web">code for this site</a> is <a href="https://git.sr.ht/~adamski/arena-web/tree/main/item/LICENSE">MIT</a>.
+ </small>
+</footer>
diff --git a/header.html b/header.html
new file mode 100644
index 0000000..06e37e1
--- /dev/null
+++ b/header.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<html lang="en" id="top">
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="icon" href="data:,">
+ <title>{{TITLE}}</title>
+ <link href="https://arena.adast.dk/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
+ <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}table{text-align:left;width:100%;}</style>
+</head>
+
+<nav>
+ <a href="#menu">Menu &darr;</a>
+</nav>
+
+<main>
diff --git a/index.md b/index.md
new file mode 100644
index 0000000..97ad06a
--- /dev/null
+++ b/index.md
@@ -0,0 +1,33 @@
+# arena: Quake-like multiplayer shooter
+
+> **arena** is currently on hiatus. I am hoping to do a
+> complete open-source rewrite using the [Godot game
+> engine](https://godotengine.org).<br>
+> ~ *2023-12-17*
+
+**arena** (working title) is a multiplayer old-school arena shooter being made
+by me, [Adam Stück](https://adast.dk), with the Unity game engine. It's a hobby
+project that I have been working on since 2016. It started as a *warmup*
+project before jumping into developing an MMO, but I have since learned how
+much work goes into making just a multiplayer fps. Especially as a solo
+project.
+
+At it's core, **arena** is supposed to be my attempt at recreating a mix of
+Quake 3 / Quake Live along with whatever else I decide to add.
+
+Main features (so far):
+
+- p2p multiplayer
+- support for custom maps
+- vq3-like movement
+- rocket launcher + rocket jumping
+- health pickups
+- 3 gamemodes (FFA, TDM, Race)
+
+I'm in the process of rewriting a lot of systems in the game at the moment
+because I'm switching from janky p2p multiplayer to an authoritative server
+setup with client-side prediction
+[(more)](https://www.gabrielgambetta.com/client-server-game-architecture.html).
+
+* [Gameplay clips](https://tv.adast.dk/c/arena/videos)
+* [Follow my progress](https://trello.com/b/ycQyrouQ)
diff --git a/src/_footer.html b/src/_footer.html
deleted file mode 100644
index 7408831..0000000
--- a/src/_footer.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<footer role="contentinfo">
-
- <span><a href="#">↑ Back to Top</a></span><br><br>
- <small>
- Built with <a href="https://rgz.ee/ssg.html">ssg</a>.<br>
- The <a href="https://git.sr.ht/~adamski/arena-web">code for this site</a> is <a href="https://git.sr.ht/~adamski/arena-web/tree/main/item/LICENSE">MIT</a>.
- </small>
-</footer>
-</main>
-</body>
-</html>
diff --git a/src/_header.html b/src/_header.html
deleted file mode 100644
index f45e37a..0000000
--- a/src/_header.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title></title>
- <link rel="icon" type="image/x-icon" href="/favicon.ico">
- <link rel="alternate" type="application/rss+xml" title="" href='feed'>
- <link rel="stylesheet" type="text/css" href="/main.css">
- </head>
- <body>
- <header>
- <nav>
- <a href="/">Home</a><span> | </span>
- <a href="/rss.xml">RSS</a>
- </nav>
- </header><main>
diff --git a/src/favicon.ico b/src/favicon.ico
deleted file mode 100644
index d537e87..0000000
--- a/src/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/src/index.md b/src/index.md
deleted file mode 100644
index a60a462..0000000
--- a/src/index.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# arena: Quake-like multiplayer shooter
-
-2021-05-07
-
-> TODO: Update post!
-
-Aftershock (working title) is a multiplayer old-school arena shooter being made in Unity. It's a hobby project that I have been working on since 2016. It started as a *warmup* project before jumping into developing an MMO, but I have since learned how much work goes into making just a multiplayer fps. Especially as a solo project.
-
-At it's core, Aftershock is supposed to be my attempt at recreating a mix of Quake 3 / Quake Live along with whatever else I decide to add.
-
-Main features (so far):
-
-- p2p multiplayer
-- support for custom maps
-- vq3-like movement
-- rocket launcher + rocket jumping
-- health pickups
-- 3 gamemodes (FFA, TDM, Race)
-
-I'm in the process of rewriting a lot of systems in the game at the moment because I'm switching from janky p2p multiplayer to an authoritative server setup with client-side prediction [(more)](https://www.gabrielgambetta.com/client-server-game-architecture.html).
-
-&#10148;&ensp;[Gameplay clips](https://tv.adast.dk/c/arena/videos)
-&#10148;&ensp;[Follow my progress](https://trello.com/b/ycQyrouQ)
-
-<hr style="border-top: dotted 1px;" />
-
-Have a comment on one of my posts? Start a discussion in [my public inbox](https://lists.sr.ht/~adamski/public-inbox) by
-sending an email to [~adamski/public-inbox@lists.sr.ht](mailto:~adamski/public-inbox@lists.sr.ht) [[mailing list
-etiquette](https://man.sr.ht/lists.sr.ht/etiquette.md)]
diff --git a/src/main.css b/src/main.css
deleted file mode 100644
index 4d89bb6..0000000
--- a/src/main.css
+++ /dev/null
@@ -1,90 +0,0 @@
-* {
- box-sizing: border-box;
-}
-body {
- font-family: sans-serif;
- line-height: 1.45;
- margin: 0 auto;
- max-width: 45rem;
- padding: 0 15px;
-}
-hr {
- background-color: grey;
- border: 0;
- height: 1px;
- margin: 2rem 0;
-}
-nav {
- margin: 2rem 0 0;
-}
-main p {
- margin: 1rem;
-}
-h1,h2,h3,h4 {
- margin: 2rem 0 0;
-}
-h1 {
- margin-bottom: 0.5rem;
-}
-h1 + p {
- margin: 0 0 1rem;
-}
-span.created {
- display: block;
- margin: 4px 15px;
-}
-img {
- border: 1px solid lightgrey;
- height: auto;
- max-width: 100%;
- width: auto;
-}
-blockquote {
- background-color: linen;
- border-left: 4px solid lightcoral;
- margin: 2rem 0;
- padding: 10px;
-}
-blockquote p {
- margin: 0;
-}
-figure {
- margin: 2rem 0;
-}
-figcaption {
- color: slategrey;
-}
-code {
- background: #eee;
- padding: 0.3rem;
- tab-size: 4;
-}
-pre {
- background: #eee;
-}
-pre code {
- background: none;
- display: block;
- overflow-x: auto;
- padding: 0.3rem 0.6rem;
-}
-table {
- border-collapse: collapse;
- margin: 2rem 0;
- text-align: left;
- width: 100%;
-}
-tr {
- border-bottom: 1px solid lightgrey;
-}
-tr:nth-of-type(odd) td {
- background-color: #f8f8f8;
-}
-th,td {
- padding: 6px;
-}
-footer {
- border-top: 1px dashed grey;
- margin: 2rem 0;
- padding: 1rem 15px;
-}
diff --git a/src/rss.xml b/src/rss.xml
deleted file mode 100644
index 76dbb16..0000000
--- a/src/rss.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
- <channel>
- <title>adamski's arena</title>
- <link>https://arena.adast.dk/rss.xml</link>
- <description>Updates to the arena project</description>
- <language>en-us</language>
- <atom:link href="https://arena.adast.dk/rss.xml" rel="self" type="application/rss+xml" />
-
-<item>
-<title>arena: Quake-like multiplayer shooter</title>
-<guid>https://arena.adast.dk</guid>
-<link>https://arena.adast.dk</link>
-<pubDate>Tue, 27 Sep 2022 21:15:11 +0200</pubDate>
-<description><![CDATA[<p>Aftershock (working title) is a multiplayer old-school arena shooter being made in Unity. It&#8217;s a hobby project that I have been working on since 2016. It started as a <em>warmup</em> project before jumping into developing an MMO, but I have since learned how much work goes into making just a multiplayer fps. Especially as a solo project. </p>
-
-<p>At it&#8217;s core, Aftershock is supposed to be my attempt at recreating a mix of Quake 3 &#47; Quake Live along with whatever else I decide to add. </p>
-
-<p>Main features (so far):</p>
-
-<ul>
-<li>p2p multiplayer</li>
-<li>support for custom maps</li>
-<li>vq3-like movement</li>
-<li>rocket launcher + rocket jumping</li>
-<li>health pickups</li>
-<li>3 gamemodes (FFA, TDM, Race)</li>
-</ul>
-
-<p>I&#8217;m in the process of rewriting a lot of systems in the game at the moment because I&#8217;m switching from janky p2p multiplayer to an authoritative server setup with client-side prediction <a href="https://www.gabrielgambetta.com/client-server-game-architecture.html">(more)</a>.</p>
-
-<p>&#10148;&#8194;<a href="https://tv.adast.dk/c/arena/videos">Gameplay clips</a><br/>
-&#10148;&#8194;<a href="https://trello.com/b/ycQyrouQ">Follow my progress</a></p>
-]]></description>
-</item>
-
-
- </channel>
-</rss>
diff --git a/ssg b/ssg
deleted file mode 100755
index d6c833c..0000000
--- a/ssg
+++ /dev/null
@@ -1,243 +0,0 @@
-#!/bin/sh -e
-#
-# https://rgz.ee/bin/ssg6
-# Copyright 2018-2019 Roman Zolotarev <hi@romanzolotarev.com>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-main() {
- test -n "$1" || usage
- test -n "$2" || usage
- test -n "$3" || usage
- test -n "$4" || usage
- test -d "$1" || no_dir "$1"
- test -d "$2" || no_dir "$2"
-
- src=$(readlink_f "$1")
- dst=$(readlink_f "$2")
-
- IGNORE=$(
- if ! test -f "$src/.ssgignore"; then
- printf ' ! -path "*/.*"'
- return
- fi
- while read -r x; do
- test -n "$x" || continue
- printf ' ! -path "*/%s*"' "$x"
- done <"$src/.ssgignore"
- )
-
- # files
-
- title="$3"
-
- h_file="$src/_header.html"
- f_file="$src/_footer.html"
- test -f "$f_file" && FOOTER=$(cat "$f_file") && export FOOTER
- test -f "$h_file" && HEADER=$(cat "$h_file") && export HEADER
-
- list_dirs "$src" |
- (cd "$src" && cpio -pdu "$dst")
-
- fs=$(
- if test -f "$dst/.files"; then
- list_affected_files "$src" "$dst/.files"
- else
- list_files "$1"
- fi
- )
-
- if test -n "$fs"; then
- echo "$fs" | tee "$dst/.files"
-
- if echo "$fs" | grep -q '\.md$'; then
- if test -x "$(which lowdown 2>/dev/null)"; then
- echo "$fs" | grep '\.md$' |
- render_md_files_lowdown "$src" "$dst" "$title"
- else
- if test -x "$(which Markdown.pl 2>/dev/null)"; then
- echo "$fs" | grep '\.md$' |
- render_md_files_Markdown_pl "$src" "$dst" "$title"
- else
- echo "couldn't find lowdown nor Markdown.pl"
- exit 3
- fi
- fi
- fi
-
- echo "$fs" | grep '\.html$' |
- render_html_files "$src" "$dst" "$title"
-
- echo "$fs" | grep -Ev '\.md$|\.html$' |
- (cd "$src" && cpio -pu "$dst")
- fi
-
- printf '[ssg] ' >&2
- print_status 'file, ' 'files, ' "$fs" >&2
-
- # sitemap
-
- base_url="$4"
- date=$(date +%Y-%m-%d)
- urls=$(list_pages "$src")
-
- test -n "$urls" &&
- render_sitemap "$urls" "$base_url" "$date" >"$dst/sitemap.xml"
-
- print_status 'url' 'urls' "$urls" >&2
- echo >&2
-}
-
-readlink_f() {
- file="$1"
- cd "$(dirname "$file")"
- file=$(basename "$file")
- while test -L "$file"; do
- file=$(readlink "$file")
- cd "$(dirname "$file")"
- file=$(basename "$file")
- done
- dir=$(pwd -P)
- echo "$dir/$file"
-}
-
-print_status() {
- test -z "$3" && printf 'no %s' "$2" && return
-
- echo "$3" | awk -v singular="$1" -v plural="$2" '
- END {
- if (NR==1) printf NR " " singular
- if (NR>1) printf NR " " plural
- }'
-}
-
-usage() {
- echo "usage: ${0##*/} src dst title base_url" >&2
- exit 1
-}
-
-no_dir() {
- echo "${0##*/}: $1: No such directory" >&2
- exit 2
-}
-
-list_dirs() {
- cd "$1" && eval "find . -type d ! -name '.' ! -path '*/_*' $IGNORE"
-}
-
-list_files() {
- cd "$1" && eval "find . -type f ! -name '.' ! -path '*/_*' $IGNORE"
-}
-
-list_dependant_files() {
- e="\\( -name '*.html' -o -name '*.md' -o -name '*.css' -o -name '*.js' \\)"
- cd "$1" && eval "find . -type f ! -name '.' ! -path '*/_*' $IGNORE $e"
-}
-
-list_newer_files() {
- cd "$1" && eval "find . -type f ! -name '.' $IGNORE -newer $2"
-}
-
-has_partials() {
- grep -qE '^./_.*\.html$|^./_.*\.js$|^./_.*\.css$'
-}
-
-list_affected_files() {
- fs=$(list_newer_files "$1" "$2")
-
- if echo "$fs" | has_partials; then
- list_dependant_files "$1"
- else
- echo "$fs"
- fi
-}
-
-render_html_files() {
- while read -r f; do
- render_html_file "$3" <"$1/$f" >"$2/$f"
- done
-}
-
-render_md_files_lowdown() {
- while read -r f; do
- lowdown \
- --html-no-escapehtml \
- --html-no-skiphtml \
- --parse-no-metadata \
- --parse-no-autolink <"$1/$f" |
- render_html_file "$3" \
- >"$2/${f%\.md}.html"
- done
-}
-
-render_md_files_Markdown_pl() {
- while read -r f; do
- Markdown.pl <"$1/$f" |
- render_html_file "$3" \
- >"$2/${f%\.md}.html"
- done
-}
-
-render_html_file() {
- # h/t Devin Teske
- awk -v title="$1" '
- { body = body "\n" $0 }
- END {
- body = substr(body, 2)
- if (body ~ /<\/?[Hh][Tt][Mm][Ll]/) {
- print body
- exit
- }
- if (match(body, /<[[:space:]]*[Hh]1(>|[[:space:]][^>]*>)/)) {
- t = substr(body, RSTART + RLENGTH)
- sub("<[[:space:]]*/[[:space:]]*[Hh]1.*", "", t)
- gsub(/^[[:space:]]*|[[:space:]]$/, "", t)
- if (t) title = t
- }
- n = split(ENVIRON["HEADER"], header, /\n/)
- for (i = 1; i <= n; i++) {
- if (match(tolower(header[i]), "<title></title>")) {
- head = substr(header[i], 1, RSTART - 1)
- tail = substr(header[i], RSTART + RLENGTH)
- print head "<title>" title "</title>" tail
- } else print header[i]
- }
- print body
- print ENVIRON["FOOTER"]
- }'
-}
-
-list_pages() {
- e="\\( -name '*.html' -o -name '*.md' \\)"
- cd "$1" && eval "find . -type f ! -path '*/.*' ! -path '*/_*' $IGNORE $e" |
- sed 's#^./##;s#.md$#.html#;s#/index.html$#/#'
-}
-
-render_sitemap() {
- urls="$1"
- base_url="$2"
- date="$3"
-
- echo '<?xml version="1.0" encoding="UTF-8"?>'
- echo '<urlset'
- echo 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
- echo 'xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9'
- echo 'http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"'
- echo 'xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'
- echo "$urls" |
- sed -E 's#^(.*)$#<url><loc>'"$base_url"'/\1</loc><lastmod>'"$date"'</lastmod><priority>1.0</priority></url>#'
- echo '</urlset>'
-}
-
-main "$@"