• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

AUTHORSH A D05-Sep-2003615 2920

ChangeLogH A D24-Oct-20033.5 KiB16286

ChangesH A D02-Oct-20032.1 KiB4442

MakefileH A D03-May-20221.3 KiB5024

READMEH A D02-Oct-200311 KiB294222

TODOH A D05-Sep-2003417 98

io.hH A D05-Sep-20031.9 KiB6726

server.cH A D03-May-202223.7 KiB967788

server.hH A D05-Sep-2003151 96

sockets.cH A D09-Sep-20034.5 KiB206161

sockets.hH A D05-Sep-2003487 1910

tetrinet.cH A D03-May-202220.3 KiB753614

tetrinet.hH A D07-Sep-20032.4 KiB9958

tetris.cH A D07-Sep-200326.1 KiB1,047827

tetris.hH A D03-May-20222.1 KiB7447

tty.cH A D03-May-202227.9 KiB1,091848

version.hH A D02-Oct-2003221 134

README

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