Merge pull request #220 from xexyl/1993-rince
This commit is contained in:
1 file changed
+47
-35
+47
-35
@@ -7,7 +7,7 @@
|
|||||||
England
|
England
|
||||||
|
|
||||||
|
|
||||||
# To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
make all
|
||||||
|
|
||||||
@@ -15,32 +15,36 @@
|
|||||||
in modern systems. Thank you Yusuke!
|
in modern systems. Thank you Yusuke!
|
||||||
|
|
||||||
|
|
||||||
# Judges' comments:
|
|
||||||
|
|
||||||
To run:
|
## To run:
|
||||||
make rince
|
|
||||||
rince [cabbage]
|
./rince [cabbage]
|
||||||
|
|
||||||
where:
|
where:
|
||||||
[cabbage] a CABBAGE description file (default: rince.c)
|
[cabbage] a CABBAGE description file (default: `rince.c`)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
The author has provided several CABBAGE files for your amusement:
|
The author has provided several CABBAGE files for your amusement:
|
||||||
|
|
||||||
rince.data1 plays breakout. Keys are ',' for left, '/'
|
- `rince.data1` plays breakout. Keys are ',' for left, '/' for right, and '.' for 'fire the ball'.
|
||||||
for right, and '.' for 'fire the ball'.
|
|
||||||
|
|
||||||
rince.data2 plays the old rince game from IOCCC 1991
|
- `rince.data2` plays the old rince game from IOCCC 1991.
|
||||||
|
|
||||||
rince.data3 Sokoban screen 11. You are the 'o' character. You
|
- `rince.data3` Sokoban screen 11. You are the 'o' character. You must push the
|
||||||
must push the money 'm' into the dotted region of
|
money 'm' into the dotted region of the screen. The game is considered finished
|
||||||
the screen. The game is considered finished when
|
when all the `m`s are then `M`s.
|
||||||
all the 'm's are then 'M's.
|
|
||||||
|
|
||||||
rince.data4 Sokoban screen 13. Same rules as above.
|
- `rince.data4` Sokoban screen 13. Same rules as above.
|
||||||
|
|
||||||
For a brief design description, see rince.design.
|
For a brief design description, see [rince.design](rince.design).
|
||||||
|
|
||||||
The select(2) from SunOS says:
|
The `select(2)` from SunOS says:
|
||||||
|
|
||||||
BUGS
|
BUGS
|
||||||
|
|
||||||
@@ -53,7 +57,7 @@ in modern systems. Thank you Yusuke!
|
|||||||
pointer will be unmodified by the select() call.
|
pointer will be unmodified by the select() call.
|
||||||
|
|
||||||
Systems such as Linux does return the remaining time in timeout
|
Systems such as Linux does return the remaining time in timeout
|
||||||
field (0 if no keys were pressed), but `rince' assumes that
|
field (0 if no keys were pressed), but `rince` assumes that
|
||||||
timeout remains unmodified.
|
timeout remains unmodified.
|
||||||
|
|
||||||
It has been suggested that:
|
It has been suggested that:
|
||||||
@@ -66,18 +70,22 @@ in modern systems. Thank you Yusuke!
|
|||||||
|
|
||||||
where whatever_you_want is some integer such as 17 or 19.
|
where whatever_you_want is some integer such as 17 or 19.
|
||||||
|
|
||||||
WARNING:
|
### WARNING for SunOS 4.1.x:
|
||||||
|
|
||||||
If you are running SunOS 4.1.x (assuming you can find an ANSI
|
If you are running SunOS 4.1.x (assuming you can find an ANSI
|
||||||
compiler in the first place), this program may be used to log
|
compiler in the first place), this program may be used to log
|
||||||
out very quickly. Unfortunately, you can't do anything else
|
out very quickly. Unfortunately, you can't do anything else
|
||||||
with it.
|
with it.
|
||||||
|
|
||||||
|
### Slowing down the game
|
||||||
|
|
||||||
Some people may want to slow down the game by increasing the
|
Some people may want to slow down the game by increasing the
|
||||||
value 17 in the line:
|
value 17 in the line:
|
||||||
|
|
||||||
|
|
||||||
struct timeval v= {0,1<<17} ;
|
struct timeval v= {0,1<<17} ;
|
||||||
|
|
||||||
|
|
||||||
to something like 18 or 19.
|
to something like 18 or 19.
|
||||||
|
|
||||||
One may also need to do a "stty sane" if you kill the program
|
One may also need to do a "stty sane" if you kill the program
|
||||||
@@ -85,36 +93,39 @@ in modern systems. Thank you Yusuke!
|
|||||||
|
|
||||||
Some people report that rince dumps core on their system.
|
Some people report that rince dumps core on their system.
|
||||||
|
|
||||||
On some systems that use gcc, the curses.h used by gcc
|
On some systems that use gcc, the curses.h used by gcc (typically
|
||||||
(typically /usr/local/include/curses.h) is not compatible with
|
`/usr/local/include/curses.h` if not `/usr/include/curses.h`) is not compatible
|
||||||
the curses library (typically /lib/libcurses.a) used. It has
|
with the curses library (typically `/lib/libcurses.a` for static libraries)
|
||||||
been suggested that the following gcc command may help:
|
used. It has been suggested that the following gcc command may help:
|
||||||
|
|
||||||
|
|
||||||
gcc -fno-builtin -I/usr/include -o rince rince.c -lcurses -ltermcap
|
gcc -fno-builtin -I/usr/include -o rince rince.c -lcurses -ltermcap
|
||||||
|
|
||||||
|
|
||||||
Selected notes from the author:
|
## Selected notes from the author:
|
||||||
|
|
||||||
This is a Cellular Automata Based, Beautifully Abysmal Game Environment (or
|
This is a Cellular Automata Based, Beautifully Abysmal Game Environment (or
|
||||||
CABBAGE for short). To execute the program simply type 'jkb gamefile',
|
CABBAGE for short). To execute the program simply type `./rince gamefile`,
|
||||||
where `gamefile' is a game description file. A couple are supplied for
|
where `gamefile` is a game description file. A couple are supplied for
|
||||||
your enjoyment. Alternatively, with no arguments it will default to using
|
your enjoyment. Alternatively, with no arguments it will default to using
|
||||||
it's own datafile (the source code in fact). This happens to be a game of
|
it's own datafile (the source code in fact). This happens to be a game of
|
||||||
space invaders. To prevent people from firing too often a very simple
|
space invaders. To prevent people from firing too often a very simple
|
||||||
method is employed; you must move after firing to be able to fire again.
|
method is employed; you must move after firing to be able to fire again.
|
||||||
|
|
||||||
Keys are: Left : j
|
### Keys
|
||||||
Right : l
|
|
||||||
Fire : k
|
- Left j
|
||||||
|
- Right l
|
||||||
|
- Fire k
|
||||||
|
|
||||||
This is a new breed of generic games. For instance:
|
This is a new breed of generic games. For instance:
|
||||||
|
|
||||||
Game play : Whatever you define
|
Game play : Whatever you define
|
||||||
Keys : Whatever you define
|
Keys : Whatever you define
|
||||||
Score : If you can figure out how to update it!
|
Score : If you can figure out how to update it!
|
||||||
Levels : Ahh well... it's not *totally* generic.
|
Levels : Ahh well... it's not *totally* generic.
|
||||||
|
|
||||||
The proper definition for usage would be:
|
The proper definition for usage would be: `./rince [data_filename]`
|
||||||
jkb [data_filename]
|
|
||||||
|
|
||||||
Portability
|
Portability
|
||||||
-----------
|
-----------
|
||||||
@@ -123,6 +134,7 @@ Selected notes from the author:
|
|||||||
|
|
||||||
System OS Compiler
|
System OS Compiler
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
|
|
||||||
DECstation 5000/240 Ultrix 4.2A c89 -std
|
DECstation 5000/240 Ultrix 4.2A c89 -std
|
||||||
SPARCstation 1+ SunOS 4.1 gcc -ansi -pedantic
|
SPARCstation 1+ SunOS 4.1 gcc -ansi -pedantic
|
||||||
SPARCstation 10/31 Solaris 2.1 gcc -ansi -pedantic (*)
|
SPARCstation 10/31 Solaris 2.1 gcc -ansi -pedantic (*)
|
||||||
@@ -130,16 +142,16 @@ Selected notes from the author:
|
|||||||
SGI Indigo (R4000) IRIX 4.0.5F cc -ansi
|
SGI Indigo (R4000) IRIX 4.0.5F cc -ansi
|
||||||
Alliant FX2800 Conentrix 3.0.0 fxc
|
Alliant FX2800 Conentrix 3.0.0 fxc
|
||||||
|
|
||||||
(*) I never said it worked! The guidelines state that you dislike programs
|
* I never said it worked! The guidelines state that you dislike programs that
|
||||||
that won't *compile* under both BSD or SYS V Un*x. This compiles, and
|
won't *compile* under both BSD or SYS V `Un*x`. This compiles, and indeed runs
|
||||||
indeed runs on all the others (both BSD and SYS V) correctly.
|
on all the others (both BSD and SYS V) correctly.
|
||||||
|
|
||||||
Alas, on Solaris it compiles, but mysteriously stops displaying output
|
Alas, on Solaris it compiles, but mysteriously stops displaying output
|
||||||
after a while until you quit with control C, when it all catches up again.
|
after a while until you quit with control C, when it all catches up again.
|
||||||
I think the problem may lie in either select(), or curses, (or perhaps
|
I think the problem may lie in either select(), or curses, (or perhaps
|
||||||
conflict of the two).
|
conflict of the two).
|
||||||
|
|
||||||
The use of select() no doubt makes it less portable to STRICT system V
|
The use of `select()` no doubt makes it less portable to STRICT system V
|
||||||
machines. However I have tested this on several so-called system V
|
machines. However I have tested this on several so-called system V
|
||||||
machines, and all of them support select(). In fact, the select() they
|
machines, and all of them support select(). In fact, the select() they
|
||||||
support appears to be more portable between them than their poll() call.
|
support appears to be more portable between them than their poll() call.
|
||||||
@@ -182,7 +194,7 @@ Selected notes from the author:
|
|||||||
formatted data files will cause major problems. No other checking (such as
|
formatted data files will cause major problems. No other checking (such as
|
||||||
insufficient memory) is performed.
|
insufficient memory) is performed.
|
||||||
|
|
||||||
There is no 'end of game' checking method. Hence games like sokoban rely
|
There is no 'end of game' checking method. Hence games like Sokoban rely
|
||||||
on the user to decide when they have had enough. Also, there is no quit
|
on the user to decide when they have had enough. Also, there is no quit
|
||||||
mechanism other than control C.
|
mechanism other than control C.
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user