From 25eae4b2db43afa246b238b5b8d245171bfcd94b Mon Sep 17 00:00:00 2001
From: Landon Curt Noll
Modifications
Modifying the colours
Background colour
Modifying the characters for the wall, bug and snake
Modifying input keys
Modifying the status/score line
Make it so the snake starts at a random location
Additions
Health (and/or Lives)
Saving the game
Different types of walls
Blockades
Diagonal movement
Special abilities
Obstacles
More than one bug
Power-ups
Snakeskin shedding (becoming an obstacle)
Snake moves faster over time
Max times the bug evades before game over
Current bugs and things that look like bugs but are not, as of 12 September 2020.
getch() also accepts input from some input hardware other than keyboards
With negative growth the snake drops from the middle of the body
Vertical snake has more space between snake char than horizontal
Fun fact: There’s something of a built-in test unit for some features; much diff --git a/2020/ferguson1/bugs.md b/2020/ferguson1/bugs.md index 48e81016f..ad8168c6c 100644 --- a/2020/ferguson1/bugs.md +++ b/2020/ferguson1/bugs.md @@ -3,21 +3,13 @@ Current bugs and things that look like bugs but are not, as of 12 September 2020 - [Built-in test unit for some features!](#builtin-test-unit) - - [The snake doesn't seem to be moving](#stillsnake) - - [getch() also accepts input from some input hardware other than keyboards](#getch) - - [SIZE=0 is the same as SIZE=1 and other oddities](#size) - - ['I was a few places behind my tail and I ran into it!'](#bitetail) - - [With negative growth the snake drops from the middle of the body](#middleofsnake) - - [It looks like the bug is in the snake](#buginsnake) - - [On the safety of the bug placement loop](#bugplacement) - - [Vertical snake has more space between snake char than horizontal](#verticalsnake) diff --git a/2020/ferguson1/gameplay.html b/2020/ferguson1/gameplay.html index 6cddac9c1..8bfa6de31 100644 --- a/2020/ferguson1/gameplay.html +++ b/2020/ferguson1/gameplay.html @@ -130,38 +130,38 @@ for the input keys.
Photosensitive epilepsy/Stimulation overload trigger warnings
Computer playing / Automatic mode (Photosensitive epilepsy/Stimulation overload trigger)
+Hypnotic / Sleepy mode (Photosensitive epilepsy/Stimulation overload trigger)
Left, right, up and down arrow keys: move that direction.
q (and Q): quit the game.
Space: pause/resume the game (direction keys will also resume). +
q (and Q): quit the game.getch() picks up on and the game is not paused then it will be as if
-you pressed the current direction key (assuming you already moved the snake).Here I will show the initial screen as well as what a few things look like. If diff --git a/2020/ferguson1/gameplay.md b/2020/ferguson1/gameplay.md index 046b4ad39..94fe56020 100644 --- a/2020/ferguson1/gameplay.md +++ b/2020/ferguson1/gameplay.md @@ -7,59 +7,41 @@ for the input keys. 1. [Testing terminal environment/capabilities](#support) - 2. [Input keys](#input) - 3. [Gameplay](#gameplay) + * [The initial screen](#initial) - * [Playing the game](#playing) - * [Walls](#walls) - * [Cannibalism](#cannibalism) - * [Stretching (shedding)](#shedding) - * [Winning](#winning) - * [Quitting](#quitting) 4. [Gameplay modes](#modes) + * [**Photosensitive epilepsy/Stimulation overload trigger warnings**](#warning) - * [Drawing / Practice mode](#drawing) - * [Computer playing / Automatic mode (**Photosensitive epilepsy/Stimulation overload trigger**)](#auto) - * [Variations](#auto-variations) - * [Grow-Shrink (Positive/Negative Winning) mode](#grow-shrink) - * [Hypnotic / Sleepy mode (**Photosensitive epilepsy/Stimulation overload trigger**)](#hypnotic) - * [Stimulation / Calming mode](#stim) - * [Other ideas](#other-ideas) - 5. [Scripts](#scripts) * [Colours selection](#colours) - * [Automate the above gameplay modes](#preset) 6. [Other game variables](#variables) * [WAIT - Snake speed](#wait) - * [EVADE - Bug evasion frequency](#evade) - * [SIZE / MAXSIZE - Initial snake / max sizes](#sizes) - * [GROW / SHEDS - Growth / Shedding sizes](#growth) @@ -80,9 +62,7 @@ For troubleshooting other problems see [troubleshooting.html][] # 2. Input keys - Left, right, up and down **arrow keys**: move that direction. - - `q` (and `Q`): quit the game. - - Space: pause/resume the game (direction keys will also resume). Note that no other keys will resume the game; however if you press a key that `getch()` picks up on and the game is not paused then it will be as if diff --git a/2020/ferguson1/index.html b/2020/ferguson1/index.html index 0c6431b2b..20a45b150 100644 --- a/2020/ferguson1/index.html +++ b/2020/ferguson1/index.html @@ -320,20 +320,20 @@ important one, chocolate cake. Most important for the cake as the formatting is very important.
Why can you go the opposite direction and so immediately die when not cannibalising?
What are the files prog.alt.c, prog.2.c, prog-j.c and prog.alt.c ?
The gameplay I have already described but this explains the way things are @@ -711,11 +711,11 @@ be centred based on its length and the 120 columns for total. The preprocessor directives should also be centred in that way (that was my goal anyway).
The following were intentional:
53 lines.
The number of lines per vertical block (3, 5, 3, 11, 7, 1, 1, 5, 7).
Number of horizontal blocks (5)
Number of vertical blocks (9)
iocccsize 2053.
The symmetry was even more important to my mind; observe that each vertical block (or column) starts and ends on the same column (or at least that was my diff --git a/2020/ferguson1/spoilers.md b/2020/ferguson1/spoilers.md index f392b8981..66efcf194 100644 --- a/2020/ferguson1/spoilers.md +++ b/2020/ferguson1/spoilers.md @@ -15,21 +15,13 @@ already knew that so no harm there, hey? - [How does it work?](#works) - - [How does the snake movement work?](#movement) - - [Drawing (manual) and computer playing (automatic) modes](#manual-automatic) - - [Collision detection](#collision) - * [Cannibal collision detection](#cannibalcollision) - * [Collision detection when resizing the window of the game](#resizing) - - [Obfuscation](#obfuscation) - - [Skinning the snake (i.e. decreasing the iocccsize)](#skinning) - - [A few more interesting size optimisations](#size) @@ -206,7 +198,6 @@ in real life increases in size like that so suddenly? :) # Obfuscation - - I make use of the C token pasting operator. Although this is well known it's probably less known and either way it's not as simple as just having the code that it translates to. For example why have: @@ -224,7 +215,6 @@ that it translates to. For example why have: It also helps save iocccsize bytes (but not as many as it used to!). - - What is this block of code? F(MAXSIZE)g d g = f((a)((*y-2)*(y[-2]-2)),g); @@ -771,13 +761,9 @@ directives should also be centred in that way (that was my goal anyway). The following were intentional: * 53 lines. - * The number of lines per vertical block (3, 5, 3, 11, 7, 1, 1, 5, 7). - * Number of horizontal blocks (5) - * Number of vertical blocks (9) - * iocccsize 2053. The symmetry was even more important to my mind; observe that each vertical @@ -956,7 +942,6 @@ though because the score line is meant to display something, it squeezes a few more bytes and having a space is hardly an imposition on usage (and for that matter having a 'o' at 0,0 isn't either). - [gameplay.md]: gameplay.md [gameplay.html]: gameplay.html [HACKING.md]: HACKING.md diff --git a/2020/ferguson1/terminals.html b/2020/ferguson1/terminals.html index 1e8b2afe9..bc807b182 100644 --- a/2020/ferguson1/terminals.html +++ b/2020/ferguson1/terminals.html @@ -126,21 +126,21 @@ file. I discuss terminal capabilities, dimensions (setting and how to restore sanity if it causes any problems) as well as colours (limitations etc.).
-- The top wall isn’t (all/some of the time) visible!
-I set SIZE=0 GROW=1, ate a bug but still only the head was visible! Why?
I like black text on a white background but even with a white background terminal it ends up black!
Can I move the snake faster temporarily without having to modify the wait time?
On environmental variables more generally and string to int conversions
Because the score line is dynamic in length depending on the terminal size it can happen that the score/status wraps to the next line(s). This can be fixed by diff --git a/2020/ferguson1/troubleshooting.md b/2020/ferguson1/troubleshooting.md index 2582254a1..8b1ea8dd6 100644 --- a/2020/ferguson1/troubleshooting.md +++ b/2020/ferguson1/troubleshooting.md @@ -9,27 +9,16 @@ it as structured as possible/easiest to find. - [The top wall isn't (all/some of the time) visible!](#topwall) - - [The snake isn't moving!](#notmoving) - - [I can't see the snake head (or other part of the snake)!](#invisiblehead) - - [I can't see the bug!](#invisiblebug) - - [The game froze!](#froze) - - [The game gets slower as the snake gets bigger!](#bigsnake) - - [I set SIZE=0 GROW=1, ate a bug but still only the head was visible! Why?](#headonly) - - [I like black text on a white background but even with a white background terminal it ends up black!](#monochrome) - - [The text is hard to see (not bright enough)!](#toodark) - - [Can I move the snake faster temporarily without having to modify the wait time?](#movefaster) - - [On environmental variables more generally and string to int conversions](#envvars) - - [Errors and error reporting](#errors) diff --git a/2020/ferguson2/README.md b/2020/ferguson2/README.md index 3d117816f..c12b94e1d 100644 --- a/2020/ferguson2/README.md +++ b/2020/ferguson2/README.md @@ -161,28 +161,17 @@ I have more information on this entry like the testing procedure at - [IOCCC: an Enigma?](#ioccc) - - [The 1992 Nathan Sidwell entry](#nathan) - - [Usage](#usage) * [Example run](#example) - - [The recode.c configurator](#recode) - - [A parser subtlety that could cause confusion](#parsersubtlety) - - [On the source code layout](#layout) - - [Obfuscation](#obfuscation) - - [Bugs, limitations, differences from the real Enigma machines and general notes](#bugs) - - [Kriegsmarine support?](#kriegsmarine) - - [Portability](#portability) - - [Winning thoughts, dedications and thanks](#winning) - - [Resources](#resources) ### IOCCC: an Enigma? diff --git a/2020/ferguson2/recode.html b/2020/ferguson2/recode.html index 486ffad8b..4056f3b94 100644 --- a/2020/ferguson2/recode.html +++ b/2020/ferguson2/recode.html @@ -130,24 +130,24 @@ you could look at my Snake entry ‘Don’t tread award since it’s also there and not enciphered.
Write config file, read data file and pass to Enigma simulator
Piping directly to the Enigma code once (with randomised settings, saved)
To demonstrate how to and why you should use the recode program with diff --git a/2020/ferguson2/recode.md b/2020/ferguson2/recode.md index e33a9bd3e..93b926b2b 100644 --- a/2020/ferguson2/recode.md +++ b/2020/ferguson2/recode.md @@ -13,35 +13,20 @@ award](../ferguson1/prog.c) since it's also there and not enciphered. - [What is recode and why is it recommended?](#recode) - - [Options](#options) - * [Protecting against the same I/O file](#samefile) - * [File options parser limitation](#fileoptions) - * [`-R` option validation?](#validation) - - [Piping commands to recode](#pipingtorecode) - - [Piping recode to the Enigma simulator](#pipingtoenigma) - - [Manually test the recode program with the Enigma program](#manuallytest) - - [Only write config file](#onlyconfig) - - [Reusing a configuration](#reuseconfig) - - [Write config file, read data file and pass to Enigma simulator](#passtoenigma) - - [Piping directly to the Enigma code once (with randomised settings, saved)](#directlytoenigma) - - [Usage conclusion](#conclusion) - - [Example additions](#additions) - - [Example uses](#exampleuses) - - [Deliciously Enigmatic: Double-layered Chocolate Fudge Cake](#cake)