Fix markdown, html files and Makefile
In particular the lists were mangled; I made sure that the html files have the IOCCC headers/footers by using rdiscount to another file and then yanking/pasting the generated lists in the one file into the target files. I also removed terminals.markdown which was a mistake I made when I sent a patch (so I assume) to the judges. Makefile now refers to *.text instead of *.markdown and no longer refers to judges file as that was only part of the preview repo for winners. There might have been other changes I have made but everything *appears* to be okay now.
This commit is contained in:
1 parent
098a3e7e04
commit
b19b35b0a4
13 files changed
+202
-69
No files matched your search
@@ -421,10 +421,10 @@ MAY_NEED_GCC= gcc
|
||||
##############################
|
||||
#
|
||||
OBJ= prog.o termcaps.o
|
||||
DATA= COMPILING HACKING bugs.markdown cannibalism.log \
|
||||
chocolate-cake.markdown crazy.log gameplay.markdown \
|
||||
judges.markdown snake-colours.sh snake.1 spoilers.markdown \
|
||||
termcaps.c terminals.markdown troubleshooting.markdown
|
||||
DATA= COMPILING HACKING bugs.text cannibalism.log \
|
||||
chocolate-cake.text crazy.log gameplay.text \
|
||||
snake-colours.sh snake.1 spoilers.text \
|
||||
termcaps.c terminals.text troubleshooting.text
|
||||
TARGET= prog snake snake-colours play snake-colours termcaps ${ALT_TARGET}
|
||||
#
|
||||
ALT_OBJ=
|
||||
|
||||
+12
-10
@@ -27,16 +27,18 @@
|
||||
|
||||
<p>Current bugs and things that look like bugs but are not, as of 12 September 2020.</p>
|
||||
|
||||
<p><a name="toc"></a>
|
||||
- <a href="#builtin-test-unit">Built-in test unit for some features!</a>
|
||||
- <a href="#stillsnake">The snake doesn’t seem to be moving</a>
|
||||
- <a href="#getch">getch() also accepts input from some input hardware other than keyboards</a>
|
||||
- <a href="#size">SIZE=0 is the same as SIZE=1 and other oddities</a>
|
||||
- <a href="#bitetail">‘I was a few places behind my tail and I ran into it!’</a>
|
||||
- <a href="#middleofsnake">With negative growth the snake drops from the middle of the body</a>
|
||||
- <a href="#buginsnake">It looks like the bug is in the snake</a>
|
||||
- <a href="#bugplacement">On the safety of the bug placement loop</a>
|
||||
- <a href="#verticalsnake">Vertical snake has more space between snake char than horizontal</a></p>
|
||||
<p><a name="toc"></a></p>
|
||||
<ul>
|
||||
<li><p><a href="#builtin-test-unit">Built-in test unit for some features!</a></p></li>
|
||||
<li><p><a href="#stillsnake">The snake doesn't seem to be moving</a></p></li>
|
||||
<li><p><a href="#getch">getch() also accepts input from some input hardware other than keyboards</a></p></li>
|
||||
<li><p><a href="#size">SIZE=0 is the same as SIZE=1 and other oddities</a></p></li>
|
||||
<li><p><a href="#bitetail">'I was a few places behind my tail and I ran into it!'</a></p></li>
|
||||
<li><p><a href="#middleofsnake">With negative growth the snake drops from the middle of the body</a></p></li>
|
||||
<li><p><a href="#buginsnake">It looks like the bug is in the snake</a></p></li>
|
||||
<li><p><a href="#bugplacement">On the safety of the bug placement loop</a></p></li>
|
||||
<li><p><a href="#verticalsnake">Vertical snake has more space between snake char than horizontal</a></p></li>
|
||||
</ul>
|
||||
|
||||
<h1><a name="builtin-test-unit" href="#toc">Built-in test unit for some features!</a></h1>
|
||||
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
Current bugs and things that look like bugs but are not, as of 12 September 2020.
|
||||
|
||||
<a name="toc"></a>
|
||||
|
||||
- [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)
|
||||
|
||||
|
||||
# <a name="builtin-test-unit" href="#toc">Built-in test unit for some features!</a>
|
||||
|
||||
Fun fact: There's something of a built-in test unit for some features; much
|
||||
|
||||
@@ -27,12 +27,14 @@
|
||||
|
||||
<h1>Double-layered Chocolate Fudge Cake</h1>
|
||||
|
||||
<p>Here’s a delicious double-layered chocolate fudge cake (<a href="cake.jpg">picture</a>) that is
|
||||
<p>Here’s a delicious double-layered chocolate fudge cake that is
|
||||
something of my mum’s speciality. It’s complicated and I should warn that nobody
|
||||
has seemed to get it down as well as she has but it’s well worth the effort if
|
||||
you love chocolate. My late stepmum who only liked white chocolate loved this
|
||||
cake!</p>
|
||||
|
||||
<p><img src='cake.jpg' alt='picture of the double-layered chocolate fudge cake'></p>
|
||||
|
||||
<p>There are two sets of ingredients and instructions; the cake and the icing. In
|
||||
addition there are some notes to pay attention to; some will be repeated because
|
||||
they’re really important for the quality of the cake.</p>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
# Double-layered Chocolate Fudge Cake
|
||||
|
||||
Here's a delicious double-layered chocolate fudge cake ([picture][]) that is
|
||||
Here's a delicious double-layered chocolate fudge cake that is
|
||||
something of my mum's speciality. It's complicated and I should warn that nobody
|
||||
has seemed to get it down as well as she has but it's well worth the effort if
|
||||
you love chocolate. My late stepmum who only liked white chocolate loved this
|
||||
cake!
|
||||
|
||||
<img src='cake.jpg' alt='picture of the double-layered chocolate fudge cake'>
|
||||
|
||||
There are two sets of ingredients and instructions; the cake and the icing. In
|
||||
addition there are some notes to pay attention to; some will be repeated because
|
||||
they're really important for the quality of the cake.
|
||||
|
||||
@@ -30,35 +30,59 @@ have included much more than just the input keys and a few printouts of the
|
||||
game. For normal play you probably don’t even need this file at all unless it be
|
||||
for the input keys.</p>
|
||||
|
||||
<p><a name="toc"></a>
|
||||
1. <a href="#support">Testing terminal environment/capabilities</a>
|
||||
2. <a href="#input">Input keys</a>
|
||||
3. <a href="#gameplay">Gameplay</a>
|
||||
* <a href="#initial">The initial screen</a>
|
||||
* <a href="#playing">Playing the game</a>
|
||||
* <a href="#walls">Walls</a>
|
||||
* <a href="#cannibalism">Cannibalism</a>
|
||||
* <a href="#shedding">Stretching (shedding)</a>
|
||||
* <a href="#winning">Winning</a>
|
||||
* <a href="#quitting">Quitting</a>
|
||||
4. <a href="#modes">Gameplay modes</a>
|
||||
* <a href="#warning"><strong>Photosensitive epilepsy/Stimulation overload trigger warnings</strong></a>
|
||||
* <a href="#drawing">Drawing / Practice mode</a>
|
||||
* <a href="#auto">Computer playing / Automatic mode (<strong>Photosensitive epilepsy/Stimulation overload trigger</strong>)</a>
|
||||
* <a href="#auto-variations">Variations</a>
|
||||
* <a href="#grow-shrink">Grow-Shrink (Positive/Negative Winning) mode</a>
|
||||
* <a href="#hypnotic">Hypnotic / Sleepy mode (<strong>Photosensitive epilepsy/Stimulation overload trigger</strong>)</a>
|
||||
* <a href="#stim">Stimulation / Calming mode</a>
|
||||
* <a href="#other-ideas">Other ideas</a>
|
||||
5. <a href="#scripts">Scripts</a>
|
||||
* <a href="#colours">Colours selection</a>
|
||||
* <a href="#preset">Automate the above gameplay modes</a>
|
||||
6. <a href="#variables">Game variables</a>
|
||||
* <a href="#wait">WAIT - Snake speed</a>
|
||||
* <a href="#evade">EVADE - Bug evasion frequency</a>
|
||||
* <a href="#sizes">SIZE / MAXSIZE - Initial snake / max sizes</a>
|
||||
* <a href="#growth">GROW / SHEDS - Growth / Shedding sizes</a>
|
||||
7. <a href="#conclusions">Conclusion (and inspirational words for everyone)</a></p>
|
||||
<p><a name="toc"></a></p>
|
||||
|
||||
<ol>
|
||||
<li><p><a href="#support">Testing terminal environment/capabilities</a></p></li>
|
||||
<li><p><a href="#input">Input keys</a></p></li>
|
||||
<li><p><a href="#gameplay">Gameplay</a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><a href="#initial">The initial screen</a></p></li>
|
||||
<li><p><a href="#playing">Playing the game</a></p></li>
|
||||
<li><p><a href="#walls">Walls</a></p></li>
|
||||
<li><p><a href="#cannibalism">Cannibalism</a></p></li>
|
||||
<li><p><a href="#shedding">Stretching (shedding)</a></p></li>
|
||||
<li><p><a href="#winning">Winning</a></p></li>
|
||||
<li><p><a href="#quitting">Quitting</a></p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p><a href="#modes">Gameplay modes</a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><a href="#warning"><strong>Photosensitive epilepsy/Stimulation overload trigger warnings</strong></a></p></li>
|
||||
<li><p><a href="#drawing">Drawing / Practice mode</a></p></li>
|
||||
<li><p><a href="#auto">Computer playing / Automatic mode (<strong>Photosensitive epilepsy/Stimulation overload trigger</strong>)</a></p>
|
||||
|
||||
<ul>
|
||||
<li><a href="#auto-variations">Variations</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p><a href="#grow-shrink">Grow-Shrink (Positive/Negative Winning) mode</a></p></li>
|
||||
<li><p><a href="#hypnotic">Hypnotic / Sleepy mode (<strong>Photosensitive epilepsy/Stimulation overload trigger</strong>)</a></p></li>
|
||||
<li><p><a href="#stim">Stimulation / Calming mode</a></p></li>
|
||||
<li><p><a href="#other-ideas">Other ideas</a></p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p><a href="#scripts">Scripts</a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><a href="#colours">Colours selection</a></p></li>
|
||||
<li><p><a href="#preset">Automate the above gameplay modes</a></p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p><a href="#variables">Game variables</a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><a href="#wait">WAIT - Snake speed</a></p></li>
|
||||
<li><p><a href="#evade">EVADE - Bug evasion frequency</a></p></li>
|
||||
<li><p><a href="#sizes">SIZE / MAXSIZE - Initial snake / max sizes</a></p></li>
|
||||
<li><p><a href="#growth">GROW / SHEDS - Growth / Shedding sizes</a></p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p><a href="#conclusions">Conclusion (and inspirational words for everyone)</a></p></li>
|
||||
</ol>
|
||||
|
||||
|
||||
<h1>1. <a name="support" href="#toc">Testing terminal environment/capabilities</a></h1>
|
||||
|
||||
|
||||
@@ -4,35 +4,68 @@ game. For normal play you probably don't even need this file at all unless it be
|
||||
for the input keys.
|
||||
|
||||
<a name="toc"></a>
|
||||
|
||||
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. [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)
|
||||
|
||||
|
||||
7. [Conclusion (and inspirational words for everyone)](#conclusions)
|
||||
|
||||
|
||||
# 1. <a name="support" href="#toc">Testing terminal environment/capabilities</a>
|
||||
|
||||
Most people probably won't have any issue at all but for those who have any
|
||||
|
||||
@@ -181,16 +181,26 @@ and [troubleshooting.html][] - along with the most important one
|
||||
* ['Bugs'](#bugs)
|
||||
|
||||
* [NAQs/IAQs (Never/Infrequently Asked Questions)](#naqs)
|
||||
|
||||
- [Do I have any inspirations for this entry?](#inspirations)
|
||||
|
||||
- [Are there any features I thought of that I wanted to implement but did not get to for some reason or another?](#features)
|
||||
|
||||
- [Are there ways that one can make this game easier?](#easier)
|
||||
|
||||
- [Are there ways to make it harder?](#harder)
|
||||
|
||||
- [How do snakes grow in real life?](#moult)
|
||||
|
||||
- [Any other interesting things about snakes?](#other)
|
||||
|
||||
- [Why can you go the opposite direction and so immediately die when not cannibalising?](#opposite)
|
||||
|
||||
- [Do you have any **DELICIOUS CHOCOLATE CAKE** recipes?](#chocolatecake)
|
||||
|
||||
- [What are the files prog.orig.c, prog.2.c, prog-j.c and prog.alt.c ?](#alt)
|
||||
|
||||
|
||||
* [Winning thoughts, dedications and thanks](#winning)
|
||||
|
||||
|
||||
@@ -494,7 +504,9 @@ mother.
|
||||
|
||||
I also want to dedicate this to Vicky Wilmore who has given me a lot of
|
||||
love the past few years and who was there for me in some very dark times. Thank
|
||||
you Vicky sweetheart from the bottom of my heart and soul xxx.
|
||||
you Vicky sweetheart from the bottom of my heart and soul. Although we have
|
||||
parted ways, whether for now or for ever, you will always always always have a
|
||||
place in my heart and soul xxx
|
||||
|
||||
I would like to thank my dear friend Martijn Schoemaker for encouraging me in my
|
||||
programming over the years and who I owe a great deal to. Thank you for
|
||||
|
||||
@@ -513,6 +513,12 @@ without complaint and with all the love, compassion, empathy, sympathy and
|
||||
devotion anyone could ever ask for. Bless you again and again and again dear
|
||||
mother.</p>
|
||||
|
||||
<p>I also want to dedicate this to Vicky Wilmore who has given me a lot of
|
||||
love the past few years and who was there for me in some very dark times. Thank
|
||||
you Vicky sweetheart from the bottom of my heart and soul. Although we have
|
||||
parted ways, whether for now or for ever, you will always always always have a
|
||||
place in my heart and soul xxx</p>
|
||||
|
||||
<p>I would like to thank my dear friend Martijn Schoemaker for encouraging me in my
|
||||
programming over the years and who I owe a great deal to. Thank you for
|
||||
believing in me and my programming abilities (and other abilities) even when I
|
||||
|
||||
@@ -39,16 +39,23 @@ everything will be answered here.</p>
|
||||
wants to know more about it) read on. Yes I write a lot. But you probably
|
||||
already knew that so no harm there, hey?</p>
|
||||
|
||||
<p><a name="toc"></a>
|
||||
- <a href="#works">How does it work?</a>
|
||||
- <a href="#movement">How does the snake movement work?</a>
|
||||
- <a href="#manual-automatic">Drawing (manual) and computer playing (automatic) modes</a>
|
||||
- <a href="#collision">Collision detection</a>
|
||||
* <a href="#cannibalcollision">Cannibal collision detection</a>
|
||||
* <a href="#resizing">Collision detection when resizing the window of the game</a>
|
||||
- <a href="#obfuscation">Obfuscation</a>
|
||||
- <a href="#skinning">Skinning the snake (i.e. decreasing the iocccsize)</a>
|
||||
- <a href="#size">A few more interesting size optimisations</a></p>
|
||||
<p><a name="toc"></a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><a href="#works">How does it work?</a></p></li>
|
||||
<li><p><a href="#movement">How does the snake movement work?</a></p></li>
|
||||
<li><p><a href="#manual-automatic">Drawing (manual) and computer playing (automatic) modes</a></p></li>
|
||||
<li><p><a href="#collision">Collision detection</a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><a href="#cannibalcollision">Cannibal collision detection</a></p></li>
|
||||
<li><p><a href="#resizing">Collision detection when resizing the window of the game</a></p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p><a href="#obfuscation">Obfuscation</a></p></li>
|
||||
<li><p><a href="#skinning">Skinning the snake (i.e. decreasing the iocccsize)</a></p></li>
|
||||
<li><p><a href="#size">A few more interesting size optimisations</a></p></li>
|
||||
</ul>
|
||||
|
||||
<h1><a name="works" href="#toc">How does it work?</a></h1>
|
||||
|
||||
|
||||
@@ -13,16 +13,26 @@ wants to know more about it) read on. Yes I write a lot. But you probably
|
||||
already knew that so no harm there, hey?
|
||||
|
||||
<a name="toc"></a>
|
||||
|
||||
- [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)
|
||||
|
||||
|
||||
# <a name="works" href="#toc">How does it work?</a>
|
||||
|
||||
The gameplay I have already described but this explains the way things are
|
||||
|
||||
@@ -31,19 +31,30 @@
|
||||
file. I discuss terminal capabilities, dimensions (setting and how to restore
|
||||
sanity if it causes any problems) as well as colours (limitations etc.).</p>
|
||||
|
||||
<p><a name="toc"></a>
|
||||
- <a href="#termcaps">Capabilities support testing program</a>
|
||||
- <a href="#dimensions">Setting the game dimensions</a>
|
||||
* <a href="#linescolumns">The LINES and COLUMNS environmental variables</a>
|
||||
* <a href="#insanity">Terminal insanity</a>
|
||||
* <a href="#restore">Restoring the terminal</a>
|
||||
* <a href="#abuse">Terminal size abuse</a>
|
||||
- <a href="#termlimitations">Terminal limitations</a>
|
||||
- <a href="#colours">Terminal colours</a>
|
||||
* <a href="#background">Curses background</a>
|
||||
* <a href="#monochrome">Monochrome terminals</a>
|
||||
* <a href="#colourlimitations">Colour limitations</a>
|
||||
* <a href="#disablecolour">Disabling colour</a></p>
|
||||
<p><a name="toc"></a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><a href="#termcaps">Capabilities support testing program</a></p></li>
|
||||
<li><p><a href="#dimensions">Setting the game dimensions</a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><a href="#linescolumns">The LINES and COLUMNS environmental variables</a></p></li>
|
||||
<li><p><a href="#insanity">Terminal insanity</a></p></li>
|
||||
<li><p><a href="#restore">Restoring the terminal</a></p></li>
|
||||
<li><p><a href="#abuse">Terminal size abuse</a></p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p><a href="#termlimitations">Terminal limitations</a></p></li>
|
||||
<li><p><a href="#colours">Terminal colours</a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><a href="#background">Curses background</a></p></li>
|
||||
<li><p><a href="#monochrome">Monochrome terminals</a></p></li>
|
||||
<li><p><a href="#colourlimitations">Colour limitations</a></p></li>
|
||||
<li><p><a href="#disablecolour">Disabling colour</a></p></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h1><a name="termcaps" href="#toc">Capabilities support testing program</a></h1>
|
||||
|
||||
|
||||
@@ -6,19 +6,33 @@ sanity if it causes any problems) as well as colours (limitations etc.).
|
||||
|
||||
|
||||
<a name="toc"></a>
|
||||
|
||||
- [Capabilities support testing program](#termcaps)
|
||||
|
||||
- [Setting the game dimensions](#dimensions)
|
||||
|
||||
* [The LINES and COLUMNS environmental variables](#linescolumns)
|
||||
|
||||
* [Terminal insanity](#insanity)
|
||||
|
||||
* [Restoring the terminal](#restore)
|
||||
|
||||
* [Terminal size abuse](#abuse)
|
||||
|
||||
- [Terminal limitations](#termlimitations)
|
||||
|
||||
|
||||
- [Terminal colours](#colours)
|
||||
|
||||
* [Curses background](#background)
|
||||
|
||||
* [Monochrome terminals](#monochrome)
|
||||
|
||||
* [Colour limitations](#colourlimitations)
|
||||
|
||||
* [Disabling colour](#disablecolour)
|
||||
|
||||
|
||||
# <a name="termcaps" href="#toc">Capabilities support testing program</a>
|
||||
|
||||
Although it should be playable without the features I use (except that cursor
|
||||
|
||||
Reference in new issue
Block a user