From f13eee247a6f318e0bd9cabb878316e80ee916a0 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sun, 14 Jun 2026 22:23:51 +0200 Subject: Migrate software pages to Typst Co-authored-by: Cursor --- site/content/schachtmeister2.typ | 66 ----------------------------- site/content/software/cem.typ | 30 +++++++++++++ site/content/software/minitrem.typ | 68 ++++++++++++++++++++++++++++++ site/content/software/ray.typ | 38 +++++++++++++++++ site/content/software/schachtmeister2.typ | 66 +++++++++++++++++++++++++++++ static/software/cem_grating.jpg | Bin 0 -> 55306 bytes static/software/cem_presentation.jpg | Bin 0 -> 516896 bytes static/software/minitrem.jpg | Bin 0 -> 147462 bytes static/software/minitrem_aliens.jpg | Bin 0 -> 16831 bytes static/software/minitrem_crystals.jpg | Bin 0 -> 28189 bytes static/software/minitrem_humans.jpg | Bin 0 -> 46844 bytes static/software/rrt_1.jpg | Bin 0 -> 569532 bytes static/software/rrt_2.jpg | Bin 0 -> 341066 bytes 13 files changed, 202 insertions(+), 66 deletions(-) delete mode 100644 site/content/schachtmeister2.typ create mode 100644 site/content/software/cem.typ create mode 100644 site/content/software/minitrem.typ create mode 100644 site/content/software/ray.typ create mode 100644 site/content/software/schachtmeister2.typ create mode 100644 static/software/cem_grating.jpg create mode 100644 static/software/cem_presentation.jpg create mode 100644 static/software/minitrem.jpg create mode 100644 static/software/minitrem_aliens.jpg create mode 100644 static/software/minitrem_crystals.jpg create mode 100644 static/software/minitrem_humans.jpg create mode 100644 static/software/rrt_1.jpg create mode 100644 static/software/rrt_2.jpg diff --git a/site/content/schachtmeister2.typ b/site/content/schachtmeister2.typ deleted file mode 100644 index f000360..0000000 --- a/site/content/schachtmeister2.typ +++ /dev/null @@ -1,66 +0,0 @@ -#import "/common.typ": post - -#show: post.with( - title: "schachtmeister2", - date: datetime(year: 2020, month: 8, day: 15), -) - -`schachtmeister2` is a daemon for white- and blacklisting specified ISPs, hosting providers and so on. It was created for the Der Bunker Tremulous server to combat malicious players evading bans. - -The source code is available #link("https://redman.xyz/git/schachtmeister2")[here]. - -The daemon works by looking up a given IP address in WHOIS databases and reverse DNS records and analyzing the results. Its configuration file, `schachts.list`, is a list of keywords to be searched for along with a *partial rating*. The program's output, the *rating*, is the sum of partial ratings of all matched keywords. - -= Usage - -Since the daemon is meant to be used with a Tremulous server, it communicates over UDP. The protocol is extremely simple. To query `schachtmeister2` send an UDP packet (port 1337) that looks like: - -``` -\xff\xff\xff\xffsm2query ADDRESS -``` - -Note the four leading `0xFF` bytes. The daemon will send a reply to the sender's address and port that will look like: - -``` -\xff\xff\xff\xffsm2reply ADDRESS RATING -``` - -Here's an example using BSD's netcat, asking for the rating of `8.8.8.8` (Google's DNS): - -``` -$ printf "\xff\xff\xff\xffsm2query 8.8.8.8" | nc -u 127.0.0.1 1337 -����sm2reply 8.8.8.8 0 -``` - -= The list - -The daemon needs a list of keywords to operate meaningfully. The program looks for a file named `schachts.list` in its working directory. Below is an example list: - -``` -// a few known VPS and VPN providers -revdns -50 tcpvpn.com -revdns -50 vultr.com - -whois -50 "OVH" -whois -50 "DigitalOcean" -whois -50 "Digital Ocean" - -// Desala's ISP -revdns -10 .dynamic.chello.pl -``` - -The columns are: - -- Where to look for the substring: `revdns` or `whois`? -- The partial rating or how much the total rating changes if this substring is found. -- The substring to look for. Use quotation marks if you need spaces. The program does not support regular expressions yet. - -Whitespace doesn't matter but I recommend tabs for proper alignment. You can use C++-style one-line comments. - -= Reloading on the fly - -Restarting the daemon clears its cache, so you might want to avoid it. To make `schachtmeister2` reload the list, send `SIGUSR1` to the process. - -= Limitations - -This is one of those programs that I've written quickly, as crude prototypes, but have worked exceedingly well. As I couldn't be bothered to rewrite the program better, it's not very flexible and works well only in a single application. I might continue working on it if there's demand outside of Tremulous. diff --git a/site/content/software/cem.typ b/site/content/software/cem.typ new file mode 100644 index 0000000..1754553 --- /dev/null +++ b/site/content/software/cem.typ @@ -0,0 +1,30 @@ +#import "/common.typ": post, static, img, link-self + +#show: post.with( + title: "cem", + date: datetime(year: 2020, month: 8, day: 15), +) + +#figure( + img(static("software/cem_grating.jpg")), + caption: [Diffraction on a periodic grating], +) + +Cem is a simple C implementation of the finite-difference time-domain method for solving Maxwell's equations. It can simulate and visualize a number of wave phenomena like diffraction or refraction. + += Background + +#figure( + img(static("software/cem_presentation.jpg")), + caption: [Me presenting at the contest. The text on the slide is a short description of FDTD. #link("http://www.lo10.wroc.pl/pl/gala-finalowa-xii-edycji-otwartego-miedzyszkolnego-konkursu-fizycznego-im-bozeny-koronkiewicz.html")[Source]], +) + +Written two years after #link-self("software/ray")[ray], cem got me the first place in the 12th edition of the "Open Interschool Physics Contest" in 2015. The thing about this project I'm most proud of is how quickly I completed it. It took me only two weeks to go from having never heard of FDTD to the finished program. + += Compiling and running + +The source code is available at #link("https://redman.xyz/git/cem")[cem]. While considerably more well-written than ray and even has a Makefile, your mileage may vary. + +This is yet another program of mine with an arcane interface. The window displays a cross-section of the (cuboidal) simulation domain. Use the mouse to look around. Keys 1 through 3 switch between orthogonal cross-section planes. Keys 4 through 6 switch between different fields: the electric field, the magnetic field and relative permittivity. F3 opens a new window, so you can look at what's going on from different points of view. + +Press return to open the command line. Try "load omkf/1.sim" or the other, bundled files. You can figure out the rest of the commands by looking at the .sim files. Press P and O to start and pause the simulation and press L to take a single step. diff --git a/site/content/software/minitrem.typ b/site/content/software/minitrem.typ new file mode 100644 index 0000000..9c1c488 --- /dev/null +++ b/site/content/software/minitrem.typ @@ -0,0 +1,68 @@ +#import "/common.typ": post, static, img + +#show: post.with( + title: "Minitrem", + date: datetime(year: 2022, month: 4, day: 15), +) + +#figure( + img(static("software/minitrem.jpg")), + caption: [A screenshot of the game, #link("https://www.youtube.com/watch?v=Hkt2JXWH4sw")[watch the video].], +) + +Minitrem is a 2D real-time strategy game with an infinite, procedurally-generated world. The overall theme is loosely based on Tremulous. The game is written in C++, using #link("https://www.sfml-dev.org/")[SFML] for graphics and sound. Most of the assets were also made by me. + += Background + +Minitrem started in 2017 as a project for an "intro to C++" class at my University. I kept developing it until I eventually lost interest. + += Compiling + +The source code is available at #link("https://redman.xyz/git/minitrem/")[minitrem]. Make sure you have a C++14 compiler and SFML installed and run the Makefile. It should even work on Windows and OS X, your mileage may vary. + += How to play + +#figure( + img(static("software/minitrem_crystals.jpg")), + caption: [Some Crystals in a cave.], +) + +The objective of the game is to collect crystals and expand the number of your units. After starting the game, you have to place the first teleporter. Find a suitable spot (away from enemies), hold the right mouse button and select placing the teleporter from the context menu. Use the left mouse button to select the newly-placed building and use the context menu to hire a Scientist and a Soldier. This consumes Crystals, the currency in the game, displayed in the top left corner. Make sure no one is standing on the Teleporter when units are teleported. You can move selected units from the context menu. + +== Scientists + +#figure( + img(static("software/minitrem_humans.jpg")), + caption: [The two buildables: a Teleporter and a Replicator and the three unit types: a Scientist, a Builder and a Soldier.], +) + +Scientists walk quickly and can collect crystals from the world. Losing the last scientist while having not enough crystals or a teleporter to hire a new one is a game over scenario. You must take good care of them as they explode upon death, usually taking everything and everyone around with them. + +== Soldiers + +Soldiers, equipped with pump-action shotguns, fire at Spiders and Nests in range. Their ammunition is finite and will eventually need replenishing using a Replicator. You can order Soldiers to fire at a specific point using the context menu. Soldiers can also throw grenades, which deal a lot of area damage. + +== Builders + +Builders can build new Teleporters and Replicators and repair damaged buildings. To build something, stand close to the desired location and use the context menu. + +== Replicators + +Replicators spend crystals on creating shotgun ammunition and grenades. Select a Replicator and use the context menu to "replicate shells" or "replicate grenades." Once there's ammunition in the Replicator, visualized on the building's card in the lower right corner, approach it with a Soldier. Then use the Soldier's context menu to "restock shells" or "restock grenades". + +== Aliens + +#figure( + img(static("software/minitrem_aliens.jpg")), + caption: [A few Spiders near a Nest.], +) + +Aliens are the enemies of the game. Spiders attack by approaching a human and biting him to death. They spawn randomly all over the map. Spiders are sensitive to sound and will react to gunfire and explosions from a large distance. + +Nests continuously spawn new Spiders and must be destroyed for an area to become safe. Use grenades to quickly take out Nests and all nearby Spiders. + += The world + +Arguably the most interesting thing about this game is the infinite world. You can scroll as much as you want in any direction and the game will generate new chunks as needed. + +The game uses a sleep/wake system for objects, similarly to physics engines. Objects actively participate in the game only if they've been woken up and go to sleep if nothing's happening. This way there can be huge numbers of Nests and Spiders in the game, but because only a few are active at a time (those with human activity nearby), the cost is negligible. diff --git a/site/content/software/ray.typ b/site/content/software/ray.typ new file mode 100644 index 0000000..df64659 --- /dev/null +++ b/site/content/software/ray.typ @@ -0,0 +1,38 @@ +#import "/common.typ": post, static, img, link-self + +#show: post.with( + title: "ray", + date: datetime(year: 2020, month: 8, day: 15), +) + +#figure( + img(static("software/rrt_1.jpg")), + caption: [A render of the bundled scene (gamma corrected).], +) + +Ray is a multi-threaded, real-time #link("https://en.wikipedia.org/wiki/Path_tracing")[path tracer], written in C. Paths are traced through an octree, which can be edited at run-time, giving it sort of an "early Minecraft prototype" feel. Being my first "serious" program, it's rather primitive and can't work with complicated geometry or surface models. + += Background + +#figure( + img(static("software/rrt_2.jpg")), + caption: [A render of a default random octree (gamma corrected).], +) + +I wrote the program as a part of my presentation titled "A physically accurate computer light model" for the finale of the 10th edition of the "Open Interschool Physics Contest" in 2013. I didn't win as there was way too much programming and too little physics involved. I wasn't great at presenting back then either. Nevertheless this was the first step toward choosing Optics as my field of study. And I did much better two years later with #link-self("software/cem")[cem]. + += Compiling and running + +The source code is available here at #link("https://redman.xyz/git/ray")[ray]. Because this is a very old program, written back when I wasn't too experienced, compiling and running it can be a bit of a challenge. You'll probably have to figure it out yourself. + +At start the program loads a world from "world" in the working directory. If it's not present, it'll generate a fractal-looking random octree. The repository includes a weird Pripyat-looking scene. Sometimes camera physics bug out, removing the world fixes the issue. + +The controls are listed below. +- Use the mouse to look around, WASD to move around, space to fly up, C to fly down. +- *F1 releases/locks the cursor.* +- The mouse wheel adjusts the focal length (zoom level). +- Left and right mouse buttons destroy and place blocks, respectively. +- Keys Z, X, R, T, Y and U select the block type to place. In order: concrete, dirt, metal, mirror, light and banner. +- Keys 1 through 7 change the render quality (7 being the best). +- Press Q to launch a bouncy light source, F to toggle the flashlight. +- F11 renders to "offline.bmp" at a much higher resolution. diff --git a/site/content/software/schachtmeister2.typ b/site/content/software/schachtmeister2.typ new file mode 100644 index 0000000..f000360 --- /dev/null +++ b/site/content/software/schachtmeister2.typ @@ -0,0 +1,66 @@ +#import "/common.typ": post + +#show: post.with( + title: "schachtmeister2", + date: datetime(year: 2020, month: 8, day: 15), +) + +`schachtmeister2` is a daemon for white- and blacklisting specified ISPs, hosting providers and so on. It was created for the Der Bunker Tremulous server to combat malicious players evading bans. + +The source code is available #link("https://redman.xyz/git/schachtmeister2")[here]. + +The daemon works by looking up a given IP address in WHOIS databases and reverse DNS records and analyzing the results. Its configuration file, `schachts.list`, is a list of keywords to be searched for along with a *partial rating*. The program's output, the *rating*, is the sum of partial ratings of all matched keywords. + += Usage + +Since the daemon is meant to be used with a Tremulous server, it communicates over UDP. The protocol is extremely simple. To query `schachtmeister2` send an UDP packet (port 1337) that looks like: + +``` +\xff\xff\xff\xffsm2query ADDRESS +``` + +Note the four leading `0xFF` bytes. The daemon will send a reply to the sender's address and port that will look like: + +``` +\xff\xff\xff\xffsm2reply ADDRESS RATING +``` + +Here's an example using BSD's netcat, asking for the rating of `8.8.8.8` (Google's DNS): + +``` +$ printf "\xff\xff\xff\xffsm2query 8.8.8.8" | nc -u 127.0.0.1 1337 +����sm2reply 8.8.8.8 0 +``` + += The list + +The daemon needs a list of keywords to operate meaningfully. The program looks for a file named `schachts.list` in its working directory. Below is an example list: + +``` +// a few known VPS and VPN providers +revdns -50 tcpvpn.com +revdns -50 vultr.com + +whois -50 "OVH" +whois -50 "DigitalOcean" +whois -50 "Digital Ocean" + +// Desala's ISP +revdns -10 .dynamic.chello.pl +``` + +The columns are: + +- Where to look for the substring: `revdns` or `whois`? +- The partial rating or how much the total rating changes if this substring is found. +- The substring to look for. Use quotation marks if you need spaces. The program does not support regular expressions yet. + +Whitespace doesn't matter but I recommend tabs for proper alignment. You can use C++-style one-line comments. + += Reloading on the fly + +Restarting the daemon clears its cache, so you might want to avoid it. To make `schachtmeister2` reload the list, send `SIGUSR1` to the process. + += Limitations + +This is one of those programs that I've written quickly, as crude prototypes, but have worked exceedingly well. As I couldn't be bothered to rewrite the program better, it's not very flexible and works well only in a single application. I might continue working on it if there's demand outside of Tremulous. diff --git a/static/software/cem_grating.jpg b/static/software/cem_grating.jpg new file mode 100644 index 0000000..71075ad Binary files /dev/null and b/static/software/cem_grating.jpg differ diff --git a/static/software/cem_presentation.jpg b/static/software/cem_presentation.jpg new file mode 100644 index 0000000..b42e429 Binary files /dev/null and b/static/software/cem_presentation.jpg differ diff --git a/static/software/minitrem.jpg b/static/software/minitrem.jpg new file mode 100644 index 0000000..baf93ce Binary files /dev/null and b/static/software/minitrem.jpg differ diff --git a/static/software/minitrem_aliens.jpg b/static/software/minitrem_aliens.jpg new file mode 100644 index 0000000..2c0a783 Binary files /dev/null and b/static/software/minitrem_aliens.jpg differ diff --git a/static/software/minitrem_crystals.jpg b/static/software/minitrem_crystals.jpg new file mode 100644 index 0000000..80f6927 Binary files /dev/null and b/static/software/minitrem_crystals.jpg differ diff --git a/static/software/minitrem_humans.jpg b/static/software/minitrem_humans.jpg new file mode 100644 index 0000000..9ed163e Binary files /dev/null and b/static/software/minitrem_humans.jpg differ diff --git a/static/software/rrt_1.jpg b/static/software/rrt_1.jpg new file mode 100644 index 0000000..bd643fb Binary files /dev/null and b/static/software/rrt_1.jpg differ diff --git a/static/software/rrt_2.jpg b/static/software/rrt_2.jpg new file mode 100644 index 0000000..3c8e552 Binary files /dev/null and b/static/software/rrt_2.jpg differ -- cgit