XLETTERS(6)

๐Ÿ“ฆ version 1.1.1, in debian bookworm, ubuntu jammy, ubuntu noble

XLETTERS(6) from the Games Manual โ€” okay bestie, this is the page for xletters, and it's literally catch falling words ๐Ÿ’–

โœจ NAME โœจ

xletters โ€” catch falling words. Short, sweet, iconic.

๐ŸŒธ SYNOPSIS ๐ŸŒธ

xletters [ options ]

That's the whole invocation, bestie. You run xletters with [ options ] if you want.

๐Ÿ’… DESCRIPTION ๐Ÿ’…

Okay so X Letters is a game under X, and its whole mission is to improve your typing skill. It is inspired by the game letters(6) by Larry Moss and Brent Nordquist (which itself is inspired by the game Letter Invaders, and ultimately by the famous Space Invaders). Iconic lineage, fr fr.

The goal of the game is to destroy the words that fall down from the top before they reach the bottom. To destroy a word, you must simply type it. That's it. That's the game. Slay.

The game is organized in levels of increasing difficulty. Each level is divided into two parts: a normal part and a bonus part. During the normal part, ordinary english words will fall down (found in the system's dictionary, usually /usr/dict/words). During the bonus part, the words are randomly generated from printable ascii characters.

If a word hits the ground during the normal part, you lose a life (you have five lives initially), and the word disappears (but the others keep on falling). If a word hits the ground during the bonus part, the bonus part simply ends, with no additional penalty, and the game proceeds to the next level.

The normal part of a level ends when a certain time has elapsed. The bonus part ends when either a certain time has elapsed or when a word has hit the ground. The normal duration of a half-level is 600 time units, or 45 seconds (whatever the level).

Typing a word correctly makes the word disappear and scores you one point per letter, plus five more points, plus another extra three points if the word was destroyed in the top fifth of the window. This is the only way of gaining points: partially typed words are not worth anything, and even moving to another level doesn't bring you points (this is because even if you don't type anything you will go beyond the first level). No shortcuts, bestie.

Short words fall faster than long ones. Unless otherwise specified at compile time, words are not allowed to collide into one another. Therefore, when a new word appears, the game makes sure that all the words below it fall at least as fast as it. The fall rate of the words also increases with the level (it is, however, the same between the normal part and the bonus part of the same level). The rate at which words appear is constant on a given level, but it increases with the level.

A word is considered typed when the last printable characters that you typed since the word appeared are precisely the letters of the word. This means in particular that it is possible to โ€œkill two birds with one stoneโ€ if one word ends with the letters with which another one begins โ€” in fact, if two identical words appear (an unlikely but not impossible situation), you need only type one of them. To say things differently, if you type a correct letter it will make your position in the word advance by one letter, and if you type an incorrect letter, it will make your position move back to the last place in the word that matches the characters you typed. The current position in each word is indicated by putting the already typed letters in a different color (normally red). Note that a different behaviour is selectable at compile time with which a wrong letter will cause all letters to be considered wrong (to make the difference obvious, consider the word abracadabrx: if after having typed abracadabr you press an a, the normal behaviour will take you back to abra whereas the alternate behaviour will take you back to the beginning). That's a whole lot of letter lore, but you got this.

The game keeps a high score table. When the game is over, one way or another, xletters will show, for the user and for the twenty best players, the name, the level reached, the final score, and the time during which the game was running. Normally, each player is allowed only one entry in the high score table. This can be modified at compilation time, however.

๐ŸŽฎ CONTROLS ๐ŸŽฎ

The top of the window shows three buttons. The Quit button will take you out of the game, the Pause button will pause the game or resume it if it was already paused, and the Next button will move to the next level (normal part). These buttons can also be accessed through accelerators: the Escape key will quit the game, the Tab key (or Pause if you have one) will suspend it or resume it, and the Page Down key (or Next if it is so labeled) will advance one level.

Three labels on the right of the buttons are used to indicate your lives, score and current level.

Other than that, to play the game you must simply type the words. In order for the typing to be effective, your mouse cursor must be in the game space (the large square area below the buttons and labels). If you start typing while the game is paused, it will automatically resume.

Scoring is made much more complicated if you choose to use the Next button to warp through levels. (The point is that it should be used to avoid having to go through all the easy levels if you already type very fast. So it should not handicap you excessively by giving you no points which you would have gotten if you had worked your way through those levels. On the other hand, it should not be an obvious way of gaining arbitrarily many points.) Here is the way it works: when you use the Next button to warp to the next level, you gain 350 โ€œvirtualโ€ points. Those points are indicated in parentheses after your real points in the score label. They are not worth anything by themselves. On the other hand, if you have virtual points, every time you gain some points, that many virtual points will also be converted to real points (until you no longer have virtual points). Thus, virtual points are worth something only if you prove yourself good enough to make them so. Manifesting real points, lowkey.

There are some restrictions to the use of the Next button. First, it will only work in the bonus part of a level, or if no word has fallen lower than the top fifth of the screen. This is so you can't use it to get yourself easily out of a tricky situation. Second, if you already scored some points on the current level, using the Next button will award you fewer than the normal 350 virtual points (see above), in fact precisely twice fewer than as many points as you gained on the level (but no less than zero, of course). Respect the rules, bestie.

๐Ÿงš TRAINING MODE ๐Ÿงš

xletters has a training mode, which you can invoke using the -train command line option. In training mode, only one (english) word appears at a time, anywhere on the game space, and it does not fall. A new word appears as soon as you finish typing the previous one. In training mode, there are no lives, points, levels, or bonus words. Chill vibes only.

๐Ÿ”ฅ DEATHMATCH AND DUEL ๐Ÿ”ฅ

xletters also has the amazing โ€œdeathmatchโ€ mode. To invoke this mode, use the -death command line option. This has the following effects on the behaviour of xletters: first, it will read words on the standard input, and make them fall. Second, you can choose between typing falling words, or typing a special word in a special part of the display, just above the game space. To switch between both modes, use the Mode button or press the Backspace key. The special word typed must be an english word: if the letter you type makes the word fragment no longer begin a word in the dictionary, it immediately disappears. When you type a full word, you can then send it by using the Send button or by pressing the Return key. The word sent gets printed on the standard output.

These features make sense when two copies of xletters are run in deathmatch mode, with the standard output of each being sent to the standard input of the other (possibly across the network). Then the player on each game can not only kill his falling words but also send words to the other player. PvP but make it typing.

Even more extreme than the โ€œdeathmatchโ€ mode is the โ€œduelโ€ mode, activated through the -duel command switch. In duel mode, the computer does not send words of its own, and only words sent through the standard input will appear. In this case, there is no Next button, and switching to the next level can only occur after a certain amount of time. In fact, there are no bonus parts of levels, so levels change twice more rapidly than in normal play. Moreover, a level change does not erase all the current words contrary to what happens in normal (or deathmatch) mode.

The X Letters distribution includes a shell script named xletters-duel which uses Avian Research's netcat program (nc) to open a socket, run xletters in duel mode, and try to connect to the same socket on a given computer. Thus, two people on two different computers can play a duel by each running xletters-duel with the name of the other's computer as parameter. (Both copies must be run within five seconds of the other.)

โœจ OPTIONS โœจ

okay so bestie, xletters vibes with every single standard X Toolkit command line option, and honestly the ones you'll actually care about are these:

  • -bg color โ€” picks the background color. the canvas of your whole moment. ๐Ÿ’…
  • -fg color โ€” picks the foreground color, which is what the labels and the buttons get painted in.
  • -fn font โ€” picks the font for the labels and the buttons. yes, the labels and buttons font. the falling words have their own whole thing, keep scrolling. ๐Ÿ˜Œ
  • -name name โ€” tells it which application name to go looking for resources under, instead of just using the default executable file name. important: name is NOT allowed to contain a . or a * character. do not do it. fr fr.
  • -title string โ€” sets the window title string. name your window. main character energy. ๐Ÿ‘‘
  • -geometry geometry โ€” sets where you'd prefer the window to sit. and listen: specifying a size here is not recommended. position only, bestie.
  • -display display โ€” says which X server to talk to.
  • -xrm resourcestring โ€” hands over a resource string directly, no filter, no middleman. (the original page spells this "explicitely", and honestly? iconic typo, we stan. ๐Ÿซถ)

and then xletters has its own extra options, which is where the fun lives:

  • -wfn font โ€” the font for the falling words. (this sets the wordFont resource.)
  • -wc color โ€” the color of the words themselves. (this sets the wordColor resource.)
  • -tc color โ€” the color of the part you've already typed correctly. the lil dopamine highlight. โœจ (this sets the typedColor resource.)
  • -gbg color โ€” the background color of the game space, aka the arena where everything falls. (this sets the gameSpace.background resource.)
  • -notrain โ€” do not go into training mode. this is the default, so it's just you being explicit about it. (this sets the trainingMode resource to False.)
  • -train โ€” run it in training mode (go read TRAINING MODE above, bestie). (this sets the trainingMode resource to True.)
  • -nodeath โ€” don't run in deathmatch or duel mode. also the default. (this sets the deathMode resource to normal.)
  • -death โ€” run in deathmatch mode (see DEATHMATCH AND DUEL above). (this sets the deathMode resource to death.)
  • -duel โ€” run in duel mode (see DEATHMATCH AND DUEL above). (this sets the deathMode resource to duel.)

and on top of all of that, xletters also recognizes -help and -version. go ask it questions. it'll answer. ๐ŸŽ€


๐Ÿงฉ WIDGETS ๐Ÿงฉ

here's the whole widget family tree, no cap:

  • groundBox (class Box, parent (toplevel)) โ€” the main application box, the one holding up literally every other widget. the load-bearing bestie.
  • label (class Label, parent groundBox) โ€” the xletters label. heads up: the text of this label cannot be changed. it said what it said. ๐Ÿ’€
  • quitButton (class Command, parent groundBox) โ€” the Quit button.
  • pauseButton (class Toggle, parent groundBox) โ€” the Pause button.
  • livesLabel (class Label, parent groundBox) โ€” the lives label.
  • scoreLabel (class Label, parent groundBox) โ€” the score label.
  • levelLabel (class Label, parent groundBox) โ€” the level label.
  • gameSpace (class Core, parent groundBox) โ€” the game space where the words actually fall. โญ important detail: key presses and Expose events here get handled through event handlers, not the ordinary translation/action mechanism. it's built different.

๐ŸŽ€ RESOURCES ๐ŸŽ€

beyond all the resources that the various widgets bring to the table, the xletters application itself recognizes a few. they are:

  • wordFont (class Font, type FontStruct) โ€” the font the falling words are written in.
  • wordColor (class Foreground, type Pixel) โ€” the color the falling words are written in (specifically, the untyped part of them).
  • typedColor (class HighlightColor, type Pixel) โ€” the color the typed part of the falling words is written in.
  • deathMode (class DeathMode, type String) โ€” either normal, death or duel, depending on whether the game should run in normal, deathmatch or duel mode (see DEATHMATCH AND DUEL above).
  • trainingMode (class TrainingMode, type Boolean) โ€” whether the game should run in training mode. ๐Ÿšจ and listen: this overrides any value of the deathMode resource (see TRAINING MODE above).

๐Ÿ“ FILES ๐Ÿ“

(if it wasn't overridden at compile time, that is ๐Ÿ‘€)

  • /usr/share/dict/words โ€” the dictionary of words. the whole vocabulary. your arsenal.
  • /var/games/xletters/scores โ€” the high score table. where legends get recorded. ๐Ÿ†

๐ŸŒˆ CONFIGURATION SUGGESTION ๐ŸŒˆ

this is the glow-up combo, bestie, straight from the page:

xletters -wfn '-bitstream-terminal-medium-r-normal--18-*-*-*-c-*-iso8859-1' -gbg 'MidnightBlue' -wc 'PaleGoldenrod' -tc 'Orchid'

look at those colors. MidnightBlue. PaleGoldenrod. Orchid. it's giving aesthetic. it's giving vibe. ๐Ÿฆ‹


๐Ÿ’€ BUGS ๐Ÿ’€

none known. surely a very temporary situation :-)

the author is being funny, and honestly the rest of this section is just them dragging their own work:

this is one of the ugliest programs they ever wrote, and they would not be surprised to discover plenty of bugs in it. version 1.0.0 was ugly enough. version 1.1.0 gave a whole new meaning to the word "uglyfication". ๐Ÿ˜ญ no notes, just respect for the honesty.


๐Ÿ”’ SECURITY ๐Ÿ”’

okay bestie, this one is important, sit down. ๐Ÿซถ

xletters wants to access a high score table. if that score table is going to be shared between several users, xletters will probably end up being made sgid games or some such thing.

โš ๏ธ beware: it is probably very easy to fool (or even break to pieces).

the author has no doubt that running it against a fake X server (and probably other similar things) can give not-too-hard access to whatever permissions it's been given.

consequently โ€” and this is the whole point โ€” it should not be given any critical permissions. periodt. do not hand it the keys to the kingdom. ๐Ÿšซ


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

  • Peter Horvai (peter.horvai@ens.fr) wrote the deathmatch feature and implemented mmap()ing the dictionary file.
  • David Madore (david.madore@ens.fr) wrote version 1.0.0, all the X Windows parts of the game, and this man page.

two icons. collab of the century. ๐Ÿ’œ


๐Ÿ“œ COPYING ๐Ÿ“œ

GNU public license. see the file COPYING for more information.


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

  • letters(6)
  • xtetris(6)

and that's the whole page bestie!! ๐ŸŽ‰ this edition is dated 05 NOV 1998, it's page XLETTERS(6) from the manual, and honestly? a 1998 manpage that still slays this hard is highkey iconic. go type some words. you're gonna eat. ๐Ÿ’…โœจ๐ŸŒธ

๐Ÿ“ฆ where this page comes from