File: README

package info (click to toggle)
pytris 0.98
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 132 kB
  • ctags: 70
  • sloc: python: 934; makefile: 42; sh: 41; ansic: 8
file content (80 lines) | stat: -rw-r--r-- 2,502 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Written by Radovan Garabik <garabik@melkor.dnp.fmph.uniba.sk>.
For new versions, look at http://melkor.dnp.fmph.uniba.sk/~garabik/pytris.html


pytris - two players console tetris game

This game is modelled after xtet42
(http://www.pvv.ntnu.no/~oyvindmo/xtet42/ or
http://www.farmasi.uio.no/~edvardn/tetris.html - note that these are two
divergent versions), which is a nice game, but has two disadvantages:

1) it needs Xwindow

2) it needs a good network connection between players


pytris advantages are:

1) it works on console

2) it can cope with poor network connection

3) you can select multiple variants of gameplay (different blocks, size, etc...)


And the disadvantages? Well, python is not a speed champion...


pytris communicates over UDP, both players are playing independently,
and are synchronized when a packet gets through. So even on busy and
slow networks, the game is quite playable.

There are 3 levels of communication, selected by the --nlevel option.

--nlevel=3
is most complete, each movement is transferred to the
opponent. This is what you want, if your network connection allows it.

--nlevel=2
transfers the game situation only when a piece gets to the
bottom. This needs much less bandwidth than --nlevel=3, and yet does not
impair playability too much.

--nlevel=1
transfers only changes in window size. Use on poor networks,
as a last resort.


Requirements:

reasonably fast computer (it is playable on 486, 66MHz, but you feel a
strong urge to make a cup of coffee between two falling blocks :-)) 

python with ncurses module installed.


Score:
pytris scores are kept in /var/games/pytris.score
You should create this file and make it read- and writeable for
users you consider worthy of getting into highscore table
(e.g. touch /var/games/pytris.score; chmod a+rw /var/games/pytris.score)
There is a setuid wrapper called pytris.c - you can compile it
and make setgid games.


How to play:

I suppose you already know how to play tetris. The difference from
normal (one player) tetris is that underneath your own area, you will
now see your opponent's area upside down. As you fill up rows, making
your wall collapse, your area gets larger and your opponent's area gets
smaller. The object of the game is simply to win, by squeezing your
opponent until his/her/its wall reaches the top of his/her/its area.

To start game with default options, player number 1 types:
host1$ pytris -1 host2
          
player number 2 types:
host2$ pytris -2 host1