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