Neitris - a competitive, network multiplayer,
Welcome to the Neitris homepage. I hope you have some fun here, but
most of all, I hope you have some fun playing the game with your
friends or, even better, by putting in some new code or hack, in an
effort to make the game better.
To go directly to the project's homepage in sourceforge to get the sources
...... or, you could read some introductory material about the game...
The Story so far...
Back in the heroic DOS age, a game emerged as a clone of the well
known Tetris game. The game was called Atomic Tetris and featured two
players playing against each other, sending "gifts" or "bonuses",
trying to make their opponent's life harder.
Then, sometimes around 2000 (or maybe a couple of years earlier), a
new game appeared. It was called Eittris. This game allowed up
to four players playing against other, sending "bonuses" and lines to
an opponent whenever a line was cleared. The winner of the game was
the last man standing. It was one of the most addictive and fun games
I've played till then. You can find this game at the Varmint's EITtris Home
A new breed is born...
So, you think, what does this guy wants from our lives? what's about
this Notris, ehh Netris, eeeehh how you call this, aaah yes, what
about this Neitris game?
Well, as much as I like Eittris, it has a few shortcomings:
Well, Neitris comes to address these issues. This game is written in a
high-level, interpreted language called Python. That means that
you don't need to have different executables for each OS you want to
run the game on. You simply take the source code and feed it to Python
interpreter. And of course, there are versions of the Python
Interpreter for almost every OS that exists today, like GNU/Linux,
Windows and MacOS. So, the game is cross-platform, so that you can
play it against people using a different Operating System.
- The game only runs in DOS/Windows
- The game can be only played locally
- Even though it is freeware, it is not opensource
Don't be fooled, we now live in the Matrix
...well not quite, still the Internet has become an integral part of
our life. We use it everyday, for communication via email, for banking
transactions, browsing etc...These days, we even use it for
gaming...Many modern games can be played over the Internet. Why should
Tetris and its derivatives be an exception? So, I decided to make this
game a network multiplayer game. That means that you can play this
game with a friend living in the other side of the world (well, I'm
playing it with friends in my home town, Athens, but I wouldn't be
playing if I couldn't do it over the Net).
Open Source? Are you nuts??
Why should one release a game as an open source project? Couldn't he
earn some money if he only gave away the binary, and request some
money for it? Well, there are many reasons and motivations to go
open-source, but I'm basically focusing in a single one: Collaboration. As it turns out, to develop
even the simpliest of all Games, like Neitris, for example, it takes
lots of time coding, debugging, testing and thinking for new features
to add. Unfortunately, time is a luxury these days. As it turns out,
one must work to live, and, even worse, one must work harder to live
better. So, the best way to continue development of a software
project is to share it with other people and hope that someone else
would be also interested in putting in some work on it. So, please
feel more than welcome to contribute to Neitris
So, let's get to practical stuff about the game....
This game can be played in GNU/linux (and generally, I think, in
UNIX-like OSes), in Windows and in MacOS. However, there are a couple
of requirements: You must have a version of Python installed (I've
tested it with Python 2.4), which you can get at the Python Website. You also need a python
library called PyGame, which can be found here. Version 1.7.1 of pygame works fine,
1.8 will be out soon, and we'll see what happens then.
After installing Python and then Pygame, you are ready to run the
game. Hmm, this game is played through a network, isn't it? Shouldn't
be a server somewhere to connect to? Well, yes, it should. So, what's
better than to host the server yourself? Actually, the server could be
hosted anywhere, but at this point, one of the players usually hosts
To run the server, simply type in python neitris_server.py in a command
prompt, or in a windows system, double-click the file called
neitris_server. This should start the server. However, our little
server will just stay there, waiting for someone to connect. To
connect to the server and start playing, you should also start the
client program by typing python neitris.py at a prompt, or
double-clicking at the neitris file in the folder. When you do that, a
consolo window will open (if not already open) and will ask you for
the server's IP. The player that hosts the server on his own pc can
simply press enter there or type 127.0.0.1 (the localhost
address). Other players should enter the IP address of the host
running the server.
Note: If the PC running the server is behind a firewall with
Network Address Translation (NAT) enabled, you need to
port-forward port 7777 of the firewall to port 7777 of the host PC,
otherwise the other clients, running on remote PC, won't be able to
connect to your server.
After successfully connecting to the server, the client will ask you
for a name. This is the name you will be known with by the other
players, for the rest of the gaming session. Put whatever you want
So, we are ready to go on with the game. At this point, a new window
with the title Neitris should have appeared, which reads "Press
Start to Start Game". Well....where is this damn Start button,
The keys used by the game are the following:
WAIT! Before starting to calling me names, I should tell you that you
can change the keys if you don't like them (and I bet you don't if
you're using a notebook - no numeric keypad there, eh?). To do that,
you should use your favorite text editor and edit the file
neitris_cfg.py. The naming of the keys in the form K_ is due to the
pygame library which simply calls them like this. For normal letters,
use K_a, k_b etc (note the lower case in the letter). For the normal
arrow keys use K_LEFT, K_RIGHT, K_UP, K_DOWN. For keypad keys, use
K_KP0 to K_KP9 and K_KP_ENTER for keypad enter. Function keys are K_F1
etc. Space bar is K_SPACE. Anyway, to see all the available keys do
- Start: the Start Key ... starts the game and is actually
the key "1" on your keyboard (NOT the number 1 key in the numeric
keypad, the other one...)
- Left-Right: everybody knows what these two little ones
do. Its the left and right arrows in the Numeric Keypad...
- Down: It's the down arrow in the numeric keypad and can
be used to make a piece go down faster
- Rotate left: Rotates the piece to the left...the 5 key in
the numeric keypad
- Rotate right: Rotates the piece to the right...the return
- Drop: The drop key is used to instantly put the falling
piece down. It's the 0 (Insert key, usually) in the numeric keypad
- Victim: Changes the victim (we'll talk about it in a
sec). The 5 key (not the one in the numeric keypad, the ...other one)
- Use Antidote Key: Uses the antidote to get rid of applied
powerups/bonuses(we said, WE ARE GOING TO TALK ABOUT IT IN A
WHILE). The 2 key (again, not the one in the numeric keypad, the
- The Reset-Wins key: Reset the wins counter. The 0 key
(NOT THE ONE IN THE NUMERIC KEYPAD, I THOUGHT I'VE MADE THIS POINT
CLEAR SO FAR!!!!!)
- type python at a command prompt to invoke the Python Interpreter;
- Then, from inside the interpreter, type import(pygame) and press
enter. Then type dir(pygame) and press enter. All the strings
beginning with K_ are the ones you can use, thank you very much.
Starting the Game
To start the game, press the Start button (defaults to 1) with the
focused window being the neitris window. There is a catch to this
seemingly simple task, however. Let's assume that there are 3 players
connected to the server. For the game to start, ALL THREE players must
press the Start button. If only, e.g. 2 of them, press it, the game
won't start until the third one press it. Even worse, if one player
presses the start button before the other player connects to the
server, the game will start without the latter. In any case, this is a
kind of diserable behaviour for the server...unless you think
otherwise, in which case we can discuss about it.
Playing the Game
The game finally starts. What you see looks like the picture below:
There are as many "pits" as the players in the game. Below each
pit, you can see the player's name and some other information
(more about that later). On the top-right of each pit, you can see the
next piece that will appear after the current one is dropped/placed.
The game, of course, ends when all players have died, that is, when no
new piece can be placed in their pit, because their stacked pieces
have filled the entire pit.
The Victim: field below the player name contains the
victim's name for this player. When the player gets a powerup/bonus or
completes a Tetris (clears four rows in one shot), the opponent
affected is the player's Victim. The player can change is victim at
any time during the game using the ChangeVictim button (defaults to
The Wins: field shows how many games are won by this
player. The player may reset this counter using the ResetWins button.
Finally, the Speed: field shows the speed with which the
pieces are falling, ranging from 1 (slowest) to 10 (fastest).
At random times during the game, some of the bricks in the player's
pit change shape. These are powerups/bonuses the player can take when
he clears the respective line...if he's fast enough, since they stay
there for a limited period of time.
The powerups/bonuses may affect the player himself or his
victim. Additionally, some of them have a permanent effect, whereas
others are temporary. What follows is a list of all the
powerups/bonuses currently implemented in the game:
- The Antidote - affects:
the player .
The antidote is used by the player by pressing the UseAntidote
button to undo the non-permanent powerups/bonuses received by an
opponent. The number of antidotes that the player has are shown
below his name.
- The Escalator - affects:
the victim .
The escalator creates a ladder made of bricks than spans the
lower half of the victim's pit.
- The Zed Virus - affects: the
When a victim receives the Zed virus, he only gets zed pieces to
play with for the rest of the game. He can remove the virus using an
- Reverse Keys - affects: the
When a victim receives the ReverseKeys virus, he plays with
reversed keys (that is, when he presses left, the piece goes right
and vice versa, and when he rotates left the piece rotates to the
right and vice versa) until he gets and uses an Antidote
- Rabbit - affects: the
When a victim receives the Rabbit, his speed increases by two
points. This cannot be undone by an Antidote.
- Turtle - affects: the
When a player gets a Turtle, his speed decreases by two
points. This is the only way to reverse the effect of a Rabbit
received by an opponent.
- Crystal Ball - affects: the
When a player gets a Crystal Ball, he can no longer see the next
piece to come. The effect of the Crystal Ball can be undone by an Antidote
- Clear Screen - affects: the
When a player gets a Clear Screen, his pit/screen is instantly
- Donator - affects: the
When a player gets a Donator, any lines he clears are sent to
his victim. The donator lasts for a limited period of time, after
which no more lines are sent to the victim. The duration of the
Donator is seen between the player's name and the antidote status bar
- Swap Screen - affects:
both the player and the victim
When a player gets a Swap Screen, his screen is instantly (as
far as the network delay allows) swapped with the
one of his victim.
- Up-Down - affects:
When a player gets an Up-Down, his screen is turned upside-down,
and the piece is effectively falling... upwards. The Up-Down Virus can
be removed using an Antidote.
- Dotter - affects:
When a player gets a Dotter, the bricks on his pit are turned
into dots, making it more difficult for him to place bricks correctly,
The Dotter Virus can be removed using an Antidote.
- Tetris - affects: the victim .
Well, not actually a powerup, the Tetris occurs when a player
clears four lines at one shot, using (obviously) a stick. When this
happens, the player's victim gets two rows on top of his stacked pieces.
Screenshots / Examples
More screenshots of the game in action are shown below as examples:
In this one, player 1 (Alex) has received a Zed Virus, this is why his
screen is almost full of only green and purple bricks. At the same
time, player 3 (dkava) has an Antidote in his possession, that he can
use when he needs it and has also acquired a Donator, so every line he
clears is sent to his victim, which is, in this case, player 2
(jael). The Donator lasts for as long as the red, present-shaped bar
over the Antidote icon exists.
Here, player 1 (Alex) has received a Zed (and has lost, obviously)
and his screen is also put upside-down by the Upside-Down
Virus. Player 2 (jael) has received a dotter and player 3 has two
Antidotes in his possession, whereas player 4 has only one.
There are a lot of things still to be done for this game to be
complete. What follows is a brief list of things than need to be
- More powerups/bonuses should be added.
- A Graphical User Interface (GUI) should be created to replace
the not good-looking command-line interface we have now.
- Information about the connection/disconnection of players to the
server should be sent to the clients, so that everyone knows who's
connected and ready to play at any given time.
- Sound effects should be added.
- (to be completed)..
You are more than welcome to contribute to this project in any
way, be it by improving the shapes for the bricks or powerups,
creating sounds for SFX for the various actions of the game, and of
course, by contributing some code to the project, a patch or bug fix,
a new feature or some other kind of improvement.
You can contact me at akostopou at gmail dot com. The project's
homepage at sourceforge, where you can download the source code, is here
This game is copyrighted under the GPLv2 license by Alexandros