Source Code Amnesty Day 2026

But that’s the whole point! If we had perfect code, we wouldn’t need amnesty. :–)

[!quote] Source Code Amnesty Day 2023

A wise man once told me that what matters most in coding is getting the job done, and that clean code can be a kindness to your future self but isn’t necessarily the mark of an accomplished programmer. I really take those words to heart.

While I’ve been making efforts to fix and improve older games, and learning from my mistakes to improve my workflow in future games, I also try to embrace the messiness that can come with trying to make things work under time pressure & with imperfect knowledge. Redundant synonyms, inefficient / janky processes, reinventing the wheel instead of using built-in features, objects that exists only to store a single attribute, etc… but the code still mostly did what I needed it to do, and players still had a good time overall!

My own source codes are always available on my GitHub page. Shoutout to @aschultz who very kindly helped me understand how it all works, and who keeps lots of his own code on there too!

Sharing one silly and overcomplicated bit, in the spirit of SCAD:

[!question]- How hard can it be to choose a tie to wear?
The necktie is a thing with the printed name "[if the necktie is well-tied and the necktie is bamboozled]impeccably-tied [end if][if the necktie is well-tied and the necktie is semi-bamboozled]lovingly-tied [end if]necktie". Understand "tie" and "neck tie" and "neck" and "necktie" as the necktie.

The neckties is a thing in Hastings Bedroom. Understand "tie", "ties", "necktie", "neck", "red", "green", "paisley", "pasley", "pais", "pai", "gre", "paisly", "paisely", "pasly", "red tie", "green tie", "paisley tie", "red necktie", "green necktie", "paisley necktie" and "neckties" as the neckties.

The rtdesc is a thing.
The gtdesc is a thing.
The ptdesc is a thing.

Before examining the neckties:
if the player's command includes "red":
now the rtdesc is seen;
say "A classic red necktie which had served me well for many years." instead;
if the player's command includes "green" or the player's command includes "gre":
now the gtdesc is seen;
say "The green necktie was a relatively recent acquisition, and showier than my usual garb. I had not yet had many opportunities to wear it." instead;
if the player's command includes "paisley" or the player's command includes "pai":
now the ptdesc is seen;
say "The paisley necktie had been a gift from Poirot, before my expatriation. The little man has always been fond of that pattern." instead;
otherwise:
say "I had laid out a [if the rtdesc is unseen][bold type][else][italic type][end if]red[roman type] necktie, a [if the gtdesc is unseen][bold type][else][italic type][end if]green[roman type] necktie and a [if the ptdesc is unseen][bold type][else][italic type][end if]paisley[roman type] necktie, but had not yet decided which one to wear." instead.

Before wearing the neckties:
if the player's command includes "red":
say "I finally opted for the red necktie and put the others away. I was now ready to head down to my flat and take Bob on that dreaded walk[unicode 8212]but decided to allow myself the indulgence of a warm cup of coffee first.";
now the neckties is in the Park;
now the necktie is red;
now the objective is "have coffee (2/8)";
now the player is wearing the necktie instead;
if the player's command includes "green" or the player's command includes "gre":
say "I finally opted for the green necktie and put the others away. I was now ready to head down to my flat and take Bob on that dreaded walk[unicode 8212]but decided to allow myself the indulgence of a warm cup of coffee first.";
now the neckties is in the Park;
now the necktie is green;
now the objective is "have coffee (2/8)";
now the player is wearing the necktie instead;
if the player's command includes "paisley" or the player's command includes "pai" or the player's command includes "pasely" or the player's command includes "pasley" or the player's command includes "paisly" or the player's command includes "paisely" or the player's command includes "pasly":
say "I finally opted for the paisley necktie and put the others away. I was now ready to head down to my flat and take Bob on that dreaded walk[unicode 8212]but decided to allow myself the indulgence of a warm cup of coffee first.";
now the neckties is in the Park;
now the necktie is paisley;
now the objective is "have coffee (2/8)";
now the player is wearing the necktie instead;
otherwise:
say "I had laid out a [if the rtdesc is unseen][bold type][else][italic type][end if]red[roman type] necktie, a [if the gtdesc is unseen][bold type][else][italic type][end if]green[roman type] necktie and a [if the ptdesc is unseen][bold type][else][italic type][end if]paisley[roman type] necktie, but had not yet decided which one to wear." instead.

(Then an entire repetition of that last big code block for taking the neckties, because it didn’t occur to me that I could redirect the action…)

15 Likes