Brute-force decryption of the tetrisstart message, now it works even for clients...
[tetrinet.git] / README
blobe96dd3db24ed36c6d44045929f6d8c500ae93394
1                             Tetrinet for Linux
2                             ------------------
3                   by Andrew Church <achurch@achurch.org>
4                       and Petr Baudis <pasky@ucw.cz>
6                                Version 0.11
9 For general information on Tetrinet, consult the file tetrinet.txt (the
10 text file distributed with the original Windows version).
12 The following notes apply to the Linux version of Tetrinet:
15 Distribution/license information
16 --------------------------------
17 This program is public domain, and may be modified and distributed without
18 limitation.
21 Requirements
22 ------------
23 You must be using a 50-line text display to run this version of Tetrinet;
24 Xwindows is not yet supported.  One option is to open an xterm window in
25 Xwindows and resize it to be 50 lines high.  The other option (recommended)
26 is to use a 50-line text console.
28 To get a 50-line text console, if you use LILO to boot, add the following
29 line to the top of your /etc/lilo.conf file:
31 vga = extended
33 run /sbin/lilo, and reboot.  If you use a boot disk without LILO, insert it
34 into your floppy drive, give the following command:
36 rdev -v /dev/fd0 -2
38 and reboot.
40 Another option is to use the SVGATextMode program, available on Sunsite
41 ({http,ftp}://sunsite.unc.edu/pub/Linux/) and other places, to switch your
42 console to 50-line mode without rebooting.  You may also use that program
43 to set up a larger display (for example, I use 100x60); Tetrinet will
44 detect this and rearrange the display to make the best use of the available
45 space.
47 NOTE: Xwindows graphics display really isn't supported, despite the
48 presence of the "xwin.c" file!  Don't be fooled!  (The file is there to
49 remind me to implement Xwindows support someday.  Note how well it's
50 working.)
53 Compilation
54 -----------
55 Type "make".  This will generate two programs: "tetrinet" and
56 "tetrinet-server".  The former is the main program; the latter is a
57 standalone server.
59 It is recommended to have a brief look at the start of Makefile, it may
60 contain some rather obscure but potentially invaluable compilation
61 switches. It might not be necessary to change anything there at all, but
62 it is good to be aware of the switches' existence.
65 Starting the client
66 -------------------
67 Tetrinet requires two command-line arguments: your nickname and the server
68 to connect to, in that order.  For example:
70         tetrinet MyNick tetrinet.somerandom.net
72 Tetrinet will function only as long as it remains connected to the server;
73 there is no "Client Settings" option as in the Windows version.  This may
74 be remedied in a future version.
76 You can also give Tetrinet any of the following options:
78         -fancy       Use "fancy" TTY graphics.  (Note that this will slow
79                      down redraws somewhat.)
81         -fast        Use the "tetrifast" mode to connect to the server.
82                      This mode eliminates the delay before a new cube
83                      appears, thus speeding the game up noticeably. This
84                      mode is incompatible with the classic mode and the
85                      server has to support it. If in doubt, ask the other
86                      players.
88         -log <file>  Log network traffic to the given file.  All lines
89                      start with an absolute time (seconds) in brackets.
90                      Lines sent from the client to the server are prefixed
91                      with ">>>", and lines from the server to the client
92                      are prefixed with "<<<".  This could be used with a
93                      utility program to replay a game later on (though such
94                      a program is not currently included in the Tetrinet
95                      distribution.)
97         -noshadow    Do not make pieces cast "shadows" when they are slowly
98                      falling.  (Normally the area under piece is filled by
99                      dim dots to help to determine where the piece would hit
100                      the ground if one would press the spacebar.)
102         -noslide     Do not allow pieces to "slide" after being dropped
103                      with the spacebar.  (Normally, there is a short time
104                      after pressing the spacebar during which a piece can
105                      "slide" left or right before it solidifies.)
107         -slide       Opposite of -noslide; allows pieces to "slide" after
108                      being dropped.  If both -slide and -noslide are given,
109                      -slide takes precedence.  If both -windows and -slide
110                      are given, this overrides the "no sliding" part of
111                      -windows without affecting the other changes in
112                      program behavior.
114         -shadow      Opposite of -noshadow; makes pieces cast "shadows".
116         -windows     Behave as much like the Windows version of Tetrinet as
117                      possible.  (See "Differences from Windows Tetrinet".)
118                      Implies -noslide and -noshadow.
121 Starting the server
122 -------------------
123 There are two ways to start the Tetrinet server.  One way is to give the
124 "-server" option to the Tetrinet program:
126         tetrinet -server
128 Note that this is the deprecated way and support for this may be removed in
129 the future releases. You must also explicitly enable it in the Makefile during
130 compilation.
132 The other is to run the "tetrinet-server" program.  Both of these are
133 exactly equivalent.  The server can be stopped with ^C or a "kill" command.
135 If you want the server to run in the background, use an "&" after the
136 command, for example:
138         tetrinet -server &
141 Configuring the server
142 ----------------------
143 The server is configured via the ".tetrinet" file in your home directory.
144 This contains all the settings for the server in a simple format.  The
145 following is a sample .tetrinet file:
147         winlist Alcan;0;3;1 AndrewK;0;2;1
148         classic 1
149         initiallevel 1
150         linesperlevel 2
151         levelinc 1
152         averagelevels 1
153         speciallines 1
154         specialcount 1
155         specialcapacity 18
156         pieces 14 14 15 14 14 14 15
157         specials 18 18 3 12 0 16 3 12 18
158         linuxmode 0
159         ipv6_only 0
161 Note that this file is automatically re-written at the end of a game or
162 when the server is terminated.  If you want to modify parameters for a
163 running server, send the server a HUP signal, using the command:
165         kill -HUP <pid-of-server>
167 where <pid-of-server> is the process ID of the server.  A simpler
168 alternative is:
170         killall -HUP tetrinet-server
172 Three of the configuration lines require special explanation.  The winlist
173 line is, as its name suggests, the winlist for the server; each parameter
174 contains four semicolon-separated fields:
175         name ; team ; points ; games
176 "team" is a flag which is either 1 if the entry is for a team or 0 if the
177 entry is for a player.  "points" is just the number of points for the
178 player (see the main Tetrinet documentation); "games" is the number of
179 games in which that player has participated since getting on the winlist.
181 The pieces line contains percentage frequencies for each type of piece.
182 The order is: bar, square, reverse-L (green), L (purple), Z (red),
183 S (blue), and T.
185 The specials line, likewise, contains percentage frequencies for each type
186 of special.  The order is:  A, C, N, R, S, B, G, Q, O.
188 The "linuxmode" setting selects whether the client should try to remain
189 compatible with Windows clients.  This only affects the winlist display; if
190 linuxmode is set to 1, the server will send the number of games played by
191 each player as well as points won.  This is set to zero by default.
193 If the "ipv6_only" setting is set to a nonzero value, the server will only
194 listen for IPv6 connections; if zero (default), the server will listen on
195 both IPv4 and IPv6 if possible.
198 Keys
199 ----
200 The display mode can be selected by one of the following keys:
202         F1          Show Fields
203         F2          Partyline
204         F3          Winlist
206 F10 can be used to quit at any time.
208 In Partyline mode, the following commands are available.  To use a command,
209 simply type the command and arguments into the Partyline input buffer and
210 press Return (just like IRC).
212         /team [name]  Set your team name.  If a name is not given, play
213                           alone.
214         /start        Start a game (if you are the first player on the
215                           server).
216         /stop, /end   Stop the game currently in progress (either command
217                           may be used).
218         /pause        Pause the game.
219         /unpause      Unpause the game.
220         /             Quote a following slash, for example:
221                           "/ /start starts a game."
223 The following keys are used for controls on the "Show Fields" screen:
225         Up, X       Rotate piece clockwise
226         Z           Rotate piece counterclockwise
227         Left        Move piece left
228         Right       Move piece right
229         Down        Accelerate piece downward
230         Space       Drop piece (note that by default, pieces can still
231                         "slide" after dropping!)
232         D           Discard the current (leftmost) special item
233         1..6        Use the current special item on the given player
234         T           Open a window for sending a message to other players
235         Ctrl-G      Close the text input window (text there is saved for
236                         the next time you press T)
238 The following keys are used for editing text, both in the Partyline screen
239 and in the text buffer on the Show Fields screen:
241         Left        Move cursor left one space
242         Right       Move cursor right one space
243         Ctrl-A      Move cursor to beginning of line
244         Ctrl-E      Move cursor to end of line
245         Backspace,  Delete character to left of cursor
246           Delete
247         Ctrl-D      Delete character under cursor
248         Ctrl-U      Delete entire line
249         Enter       Send text (closes input window in Show Fields mode)
252 Differences from Windows Tetrinet
253 ---------------------------------
254 Although Linux Tetrinet is designed to play more or less the same as the
255 original Windows version, there are a few differences; some of these are
256 simply "missing" features in the Linux version, and some are features I
257 have introduced into the Linux version because I believe they make the game
258 more interesting or fun.  Features marked with (*) below can all be
259 disabled with the -windows command-line option to make playing against
260 Windows opponents fairer.
262   - Messages about specials (i.e. in the Attack/Defense window) are not
263     numbered.
265   - If a Block Bomb is done on someone who has two "o" (bomb) specials
266     right next to each other, one of them will be sent flying rather than
267     exploding.  (This is a bug.)
269   - Blocks scattered by a Block Bomb will only go to empty spaces on the
270     board, rather than appearing on top of already-existing blocks.
271     "Holes" will not be scattered. (*)
273   - Pieces may go over the top of the board.  In the Windows version, a
274     player loses if at any time any square goes off the top of the board.
275     In this version, a player only loses if there is no room for the next
276     piece to enter the board.
278   - Pieces dropped (with the spacebar) can still slide left and right after
279     dropping.  Idea from Mark H. Weaver's Netris. (*)  This feature alone
280     can be disabled with the -noslide command-line option.  It can also be
281     enabled with -slide even if other Linux-specific features are disabled
282     with the -windows option.
284   - Blockquakes will cause blocks to wrap around the edge of the screen
285     rather than disappearing off the edge. (*)
287   - Blockquakes will never move rows more than one block to the left or
288     right.  (Can anyone determine how quakes work in the Windows version?)
290   - Specials collected will always appear at the end of the specials bar
291     (in the Windows version, they randomly appear at the beginning or the
292     end). (*)
295 Acknowledgements
296 ----------------
297 Tetrinet was originally written by St0rmCat, who has asked not to be
298 contacted with respect to Tetrinet.