Neitris - a competitive, network multiplayer, Tetris Clone

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 click here ...... 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 Page

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:
  1. The game only runs in DOS/Windows
  2. The game can be only played locally
  3. Even though it is freeware, it is not opensource
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.

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....

Game Requirements/Installation/Execution/Etc

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 the server.
To run the server, simply type in python 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 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 (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 there.

Game Instructions

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, anyway?

The Keys...

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 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 the following:

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 5).

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:

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.

To Do

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 worked on:

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.

Contact Details

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 Kostopoulos