snipes man page

snipes — a text maze game


snipes [-cdsx] [-jkqv] [level]


snipes is a single-player text-mode action game in which the object is to wander a maze killing evil smiley face characters (the "snipes") and the hives which create them. Of course, the snipes try to kill you at the same time.

The level argument is of the form [A-Z][1-9]. The alphabetic character specifies characteristics of the level, such as whether or not diagonal shots bounce off the walls. The numeric character specifies the level of difficulty. More details in the Levels section below.

Use the grey arrow keys to move and the keys a, s, d, and w to fire. (This works best with a QWERTY layout, of course.) You can move diagonally by pressing a combination of one vertical movement key with one horizontal movement key simultaneously and a similar approach will allow you to fire diagonally. Holding the space bar makes you move faster. CTRL-C is quit.

While running snipes on the console (not in X) you will be unable to switch VTs. Pressing CTRL-Z will suspend the raw keyboard mode (re-enabling VT switching) until you press Enter.

Jenny scrolling is named after a friend who suggested it. While it makes the screen less flickery, it's a little hard to deal with IMHO.

Display Target Options

Use ncurses(3X).
Use doublewide font hack with ncurses(3X).
Use svgalib(7).
Use X Window System.

General Options

Use Jenny scrolling mode.
Force keyboard to use safe (non-raw) mode (only with ncurses(3X) display target).
Quiet mode: do not play sound effects.
Display version number and exit.


There are three hives for levels 1->4, four hives for 5->8 and 5 hives for level 9. The maximum number of sprites for each difficulty level is 10, 25, 40, 55, 70, 90, 110, 130 and 150.

The level letter determines which features are enabled:

**** **** ****** walls deadly
******** ** walls can be destroyed
* * * * * * * * * * * *** ghosts
** ** ** ** ** **** bouncy shots


Novell NetWare 2.x came with a pair of "network testing utility" programs (games) called nsnipes and ncsnipes. nsnipes worked on monochrome displays while ncsnipes worked on color displays. The networked Novell version was based on a single player version made by SuperSet Software, called either hsnipes or just snipe. snipes is a from-scratch reimplementation and shares no code with the Novell or SuperSet games.


The snipes are pretty stupid about where they go and when and where they shoot.

In the DOS version, vertical movement is slowed down so that it seems to be about the same speed as horizontal movement. This program currently does not do that.

In the DOS version, diagonal shots don't travel exactly diagonally. The deltaX values change in the pattern {2, 2, 3, 2, 3}. See weapons.c for more detail. This program currently uses deltaX=1.

The X Window version of snipes is extremely slow.

The fact that snipes uses raw keyboard mode makes bugs somewhat more problematic than they would be otherwise. The remainder of this section describes how to minimize problems. Note that this section does not apply if you use the X Window System display target because that target does not have these problems.

Different types of computers have different keyboard scancode mappings. In order to deal with this, the dumpkeys program is used to determine the keyboard mapping at run-time. If the mapping can not be loaded from dumpkeys for any reason, raw keyboard mode will be unavailable.

If snipes crashes, the keyboard may be left in raw mode. In that case, the console will be unusable: you will not be able to switch VTs and when you type, garbage will probably appear on the screen. Recent versions of snipes should be good at preventing this, but you can be extra safe by running it like so:

snipes; kbd_mode -a; stty sane; reset

After snipes runs, even if it terminates by crashing, the subsequent three commands will run. Note that the last two restore some screen settings which may also be incorrect.

If snipes hangs for some reason, it's harder to get things fixed. If you're on a network, you can always log in remotely and kill the snipes process ("killall snipes" should do.) There are other things you can do without having to log in remotely, however. One is to set up gpm(1) (the cut and paste utility for virtual consoles) to be able to execute commands for you when you use certain combinations of mouse clicks. The command I use in my startup scripts looks like:

gpm -t $MOUSETYPE -S '/usr/bin/killall -9 snipes;/usr/bin/kbd_mode -a::'

See the man page for gpm(1) for more information on how this works. In short, it lets you kill snipes and restore the keyboard using a special sequence of mouse button clicks. If you use this method, you will want to make sure you use whatever path is appropriate on your system for the killall(1) and kbd_mode(1) programs.

Finally, recent versions of the Linux kernel have support for some "magic" SysRq key commands. If you have compiled your kernel with this enabled, pressing Alt-SysRq-R will change the keyboard translation mode back to "cooked".


Screen font for X display. Provided with dos(1).
Screen font for doublewide font hack.

See Also

ncurses(3X), svgalib(7), dumpkeys(1), dos(1).


snipes was written by Jeremy Boulton, with some help from John Meacham on the X Window System programming.


Explore man page connections for snipes(6).