DisTris

A multiplayer Tetris like game on Android. A group project in Distributed Systems.

First released in 1984, Tetris has been a huge success. Many versions for over 60 different computer platforms have been released over the decades. Many multiplayer versions let players compete by points but let them play in their own space.

In this group project together with Mischa Brander, Alexander Canals, Aaron Keller, Sebastian Keller and Sandro Meier, we created a game variant that splits the space for each user into three parts. As a player, the center is only visible to myself, left and right shared spaces are visible to and played with my neighbors on the left and right. This offers a very enjoyable twist to the game but also some technical challenges as mentioned below.

Screenshot

Maintaining a consistent state in the shared spaces of the board is of importance. We used dynamic vector clocks to order incoming events from user input and neighbors (via network). In contrast to single player versions, up to two Tetrominos can be falling together in the shared space which needed proper collision detection/prevention (up to three moving Tetrominos on each screen in total). Changes in the shared state trigger again messages to the neighbors. This includes also proper removal of rows in the shared space of neighbors (our “row clearance exchange protocol”).

Documentation and examples on on my github page.

Shorter video clip with soundLonger video clip without sound