Format and text fixes in 2020/ferguson1/snake.1
This commit is contained in:
1 parent
6a710c21fc
commit
112ce82c9a
1 file changed
+42
-45
+42
-45
@@ -4,17 +4,7 @@ snake \- Feature\-rich curses implementation of the classic 'Snake' game with ma
|
||||
.SH SYNOPSIS
|
||||
\fBWAIT\fP=\fIN\fP \fBWALLS\fP=\fI[01]\fP \fBEVADE\fP=\fIN\fP \fBSIZE\fP=\fIN\fP \fBMAXSIZE\fP=\fIN\fP \fBGROW\fP=\fIN\fP \fBSHEDS\fP=\fIN\fP \fBSHED\fP=\fIN\fP \fBCANNIBAL\fP=\fI[01]\fP ./snake
|
||||
.br
|
||||
# start pressing some arrow keys
|
||||
.br
|
||||
where
|
||||
.I N
|
||||
is a number and
|
||||
.I [01]
|
||||
is either
|
||||
.I 1
|
||||
or
|
||||
.I 0
|
||||
(or more correctly zero and non-zero).
|
||||
# Start pressing some arrow keys to play
|
||||
.SH DESCRIPTION
|
||||
\fBsnake\fP has two cheat modes (passable walls/self[cannibalism]), a drawing/practising mode, \fIcan play by itself\fP (\fBand win!\fP), is coloured (included \fIsnake-colours.sh\fP and \fIplay.sh\fP scripts compile in player\-selected colours) and there are many other play modes (many more can be devised with the imagination and the environmental variables; see \fBENVIRONMENT\fP and the file \fIgameplay.md\fP for many examples) and options.
|
||||
You can pause and there's even a built\-in test unit for some features!
|
||||
@@ -22,31 +12,31 @@ You can pause and there's even a built\-in test unit for some features!
|
||||
Besides the environmental variables (described below) that create for a lot of gameplay modes, here are some additional features:
|
||||
.PP
|
||||
.RS
|
||||
\fB\-\fP A drawing mode (\fBWAIT < 0\fP makes \fBtimeout()\fP block).
|
||||
\fB\(bu\fP A drawing mode (\fBWAIT < 0\fP makes \fBtimeout(3)\fP block).
|
||||
.RE
|
||||
.PP
|
||||
.RS
|
||||
\fB\-\fP Computer plays the game (\fBWAIT=0\fP)
|
||||
\fB\(bu\fP Computer plays the game (\fBWAIT=0\fP)
|
||||
\fB(EPILEPSY/STIMULATION OVERLOAD TRIGGER WARNING\fP included in the relevant section of the \fIgameplay.md\fP; this goes for low \fBEVADE\fP values too).
|
||||
.RE
|
||||
.PP
|
||||
.RS
|
||||
\fB\-\fP Grow\-Shrink (Positive and Negative Winning) mode (see \fIgameplay.md\fP for more details).
|
||||
\fB\(bu\fP Grow\-Shrink (Positive and Negative Winning) mode (see \fIgameplay.md\fP for more details).
|
||||
.RE
|
||||
.PP
|
||||
.RS
|
||||
\fB\-\fP Different colours and characters for the bug, snake head, snake and walls:
|
||||
\fB\(bu\fP Different colours and characters for the bug, snake head, snake and walls:
|
||||
.RS
|
||||
\fB\-\fP Bug is \fB*\fP (white).
|
||||
\fB\(bu\fP Bug is \fB*\fP (white).
|
||||
.RE
|
||||
.RS
|
||||
\fB\-\fP Head is an arrow facing the direction the snake is facing (\fB<\fP, \fB^\fP, \fB>\fP, \fBv\fP) (red).
|
||||
\fB\(bu\fP Head is an arrow facing the direction the snake is facing (\fB<\fP, \fB^\fP, \fB>\fP, \fBv\fP) (red).
|
||||
.RE
|
||||
.RS
|
||||
\fB\-\fP Body is \fBo\fP (green).
|
||||
\fB\(bu\fP Body is \fBo\fP (green).
|
||||
.RE
|
||||
.RS
|
||||
\fB\-\fP Walls are \fB#\fP (cyan).
|
||||
\fB\(bu\fP Walls are \fB#\fP (cyan).
|
||||
.RE
|
||||
.RE
|
||||
.SH OPTIONS
|
||||
@@ -56,26 +46,26 @@ The options are specified via the environmental variables.
|
||||
The following environmental variables modify the behaviour of the game:
|
||||
.TP
|
||||
.B WAIT
|
||||
positive or negative integer that changes how long to wait for a key press prior to moving again.
|
||||
Positive or negative integer that changes how long to wait for a key press prior to moving again.
|
||||
< 0 blocks which allows for complete control over movement at your own pace.
|
||||
Default 231; you can move faster by holding down or rapidly pressing an arrow key.
|
||||
.TQ
|
||||
.B WALLS
|
||||
whether the walls are passable or impassable.
|
||||
Whether the walls are passable or impassable.
|
||||
Default 1, passable; 0 means impassable and you will die if you hit a wall.
|
||||
.TQ
|
||||
.B EVADE
|
||||
how many movements the Snake makes before the bug (well insect) will move to another location in the field.
|
||||
How many movements the Snake makes before the bug (well insect) will move to another location in the field.
|
||||
Default 300; 0 disables.
|
||||
.TQ
|
||||
.B SIZE
|
||||
initial size of the Snake.
|
||||
Initial size of the Snake.
|
||||
Default 5.
|
||||
Note that it grows by one per move so at the default 5 it will not initially be 5 characters long!
|
||||
< 0 is an immediate win.
|
||||
.TQ
|
||||
.B MAXSIZE
|
||||
the maximum size the Snake can become before the game is won.
|
||||
The maximum size the Snake can become before the game is won.
|
||||
< 0 is the maximum size based on terminal dimensions; any other size will be capped based on the terminal dimensions to prevent problems.
|
||||
Note that when
|
||||
.B SIZE + GROW >= MAXSIZE
|
||||
@@ -84,26 +74,24 @@ you win
|
||||
you grow to the full size!
|
||||
.TQ
|
||||
.B GROW
|
||||
size to grow every time you eat a bug.
|
||||
Size to grow every time you eat a bug.
|
||||
Default 5; can be negative.
|
||||
"Negativity" creates for fun gameplay modes with enough creativity.
|
||||
See \fIgameplay.md\fP/\fIgameplay.html\fP for some examples.
|
||||
See \fB\<https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/gameplay.md\>\fP for some examples.
|
||||
\fIplay.sh\fP allows you to reconfigure the colours and play different pre\-configured gameplay modes.
|
||||
.TQ
|
||||
.B SHED
|
||||
every
|
||||
Every
|
||||
.B SHED
|
||||
movements you will grow (> 0), shrink (< 0) or stay the same length (0) by the
|
||||
.B SHEDS
|
||||
(below) value.
|
||||
Default 0.
|
||||
Again with creativity you can create some fun gameplay modes.
|
||||
NOTE: the concept of shedding in this game is a misnomer.
|
||||
\fB\- Exception\fP: if the bug is eaten the counter isn't incremented.
|
||||
This is how snakes grow in the wild so is a misnomer here because snakes don't grow in the manner that the original Snake game was designed.
|
||||
.TQ
|
||||
.B SHEDS
|
||||
every
|
||||
Every
|
||||
.B SHED
|
||||
movements will impact what this value means: grow (> 0), shrink (< 0) or not at all (0).
|
||||
Default 0.
|
||||
@@ -121,12 +109,14 @@ or
|
||||
See
|
||||
.I play.sh
|
||||
and
|
||||
.I gameplay.html
|
||||
.I \<https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/gameplay.md\>
|
||||
for examples.
|
||||
\fB\- Exception\fP: if the bug is eaten the counter isn't incremented.
|
||||
NOTE: the concept of shedding in this game is a misnomer.
|
||||
\fB\-\fP How many moves (\fBSHED\fP, \fIdefault 0, disabled\fP) before 'stretching' (grow) (\fBSHEDS\fP, \fIdefault 5\fP; can be negative).
|
||||
This is how snakes grow in the wild so is a misnomer here because snakes don't grow in the manner that the original Snake game was designed.
|
||||
.sp
|
||||
.RS
|
||||
.RS
|
||||
\fBException\fP: if the bug is eaten the counter isn't incremented.
|
||||
.RE
|
||||
.RE
|
||||
.PP
|
||||
The following two modify the terminal dimensions (this is not part of the game but the terminal/curses itself).
|
||||
Elsewhere I document these more and their potential pitfalls.
|
||||
@@ -223,19 +213,23 @@ Other versions I submitted. \fIprog.2.c\fP is the second version; \fIprog.3.c\fP
|
||||
It also clears the screen before playing to try and maintain terminal sanity should you pass the LINES environmental variable to the program.
|
||||
.RE
|
||||
.RE
|
||||
.SH NOTES
|
||||
The concept of shedding in this game is a misnomer.
|
||||
This is how snakes grow in the wild so it is a misnomer here because snakes don't grow in the manner that the original Snake game was designed.
|
||||
.SH BUGS
|
||||
\fB\-\fP the screen keeps showing bugs!
|
||||
.br
|
||||
\fB\-\fP there's no boss screen.
|
||||
.br
|
||||
\fB\-\fP it was written by a human being.
|
||||
.br
|
||||
\fB\-\fP technically walls, snakeskin and the snake itself would \fBnot\fP be an obstacle in real life.
|
||||
.PP
|
||||
The screen keeps showing bugs (that aren't bugs :-) )!
|
||||
.PP
|
||||
There's no boss screen.
|
||||
.PP
|
||||
It was written by a human being.
|
||||
.PP
|
||||
Technically walls, snakeskin and the snake itself would \fBnot\fP be an obstacle in real life.
|
||||
The shed snakeskin is not an obstacle but walls can be and so can the snake itself.
|
||||
Also snakes grow by moulting (technical term for shedding) so when the snake leaves its snakeskin behind it really ought to grow but instead it shrinks; this means negative shedding ought to have the snake grow and positive shedding have the snake - what?
|
||||
It's a misnomer: it took fewer bytes and the negative shedding is a positive consequence of unsigned arithmetic.
|
||||
.PP
|
||||
On a more serious note see the \fBbugs.md\fP file.
|
||||
On a more serious note see \fB\<https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/bugs.md\>\fP.
|
||||
.SH EXAMPLES
|
||||
.PP
|
||||
Test your terminal capabilities and get other various data (based on dimensions of terminal, growth size, size and max size as specified i.e. you can pass in the variables \fBLINES\fP, \fBCOLUMNS\fP, \fBMAXSIZE\fP, \fBGROW\fP and \fBSIZE\fp):
|
||||
@@ -283,9 +277,12 @@ Run script that prompts for the colours to be used, compiles and then runs the g
|
||||
.PP
|
||||
That will compile the game to be the colours you select and then enable cannibalism, set the starting size to 15, max size to 45 and walls are made impassable.
|
||||
.PP
|
||||
For more gameplay information and modes check \fIgameplay.md\fP; and for an interactive script that prompts for some of those modes see the \fIplay.sh\fP script.
|
||||
For many more gameplay information, modes and features check:
|
||||
.br
|
||||
\fB\<https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/gameplay.md\>\fP
|
||||
and for an interactive script that prompts for some of those modes see the \fIplay.sh\fP script.
|
||||
.SH AUTHOR
|
||||
Written by Cody Boone Ferguson for IOCCC 2020 (the 27th IOCCC).
|
||||
.SH SEE ALSO
|
||||
.PP
|
||||
\fB\<https://ioccc.xexyl.net/2020/snake\>\fP The 27th IOCCC 'Don't tread on me' award.
|
||||
\fB\<https://ioccc.xexyl.net/2020/snake\>\fP The 27th IOCCC 'Don't tread on me award' winning entry.
|
||||
Reference in new issue
Block a user