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