A web-based no-signup two-player competative tetris game. You can easily try out the running code by visiting one of the live sites:
masterbranch auto-deploys to tetris.kleinflask.mestagingbranch auto-deploys to tetris-staging.kleinflask.me
The site itself currently includes no instructions, so it's a good thing you found this repo :D.
The object of the game is to survive longer than your opponent. Currently there is not concept of score. All of the normal rules of tetris apply (i.e. complete a row to make it disapear) but with an additional incentive to complete more than on row at a time: For each row past the 1st you complete with a single block, that many "dead" rows will be sent to the bottom of your opponent's screen. If you already have dead rows on your screen, these will be deleted from your screen before any are sent to your opponent's screen.
For example, if I have no dead rows on my screen, and I complete 4 rows with a single block, 3 dead rows will be sent to the bottom of my opponents screen. If I have 1 dead row on my screen, and I complete 4 rows with a single block, the 1 dead row will be deleted from my screen, and 2 will be sent to my opponent's screen.
Worup-arrow: Drop blockAorleft-arrow: Move block leftSordown-arrow: Move block down fasterDorright-arrow: Move block rightQorpage-up: Rotate block counter-clockwiseEorpage-down: Rotate block clockwiseForspace-bar: Swap active block with stored block
Swipe up: Drop blockDrag left: Move block leftDrag right: Move block rightDrag down: Move block down fasterTap left half of screen: Rotate block counter-clockwiseTap right half of screen: Rotate block clockwiseTap top quarter of screen: Swap active block with stored block
NOTE: It is highly recommended to tap the storage box in the upper left to enter fullscreen mode on mobile.
- The websocket connections that allow you to see the state of your opponent's board are unreliable. Need some kind of self-healing mechanism.
- The server currently echos any message it recieves from a player's websocket connection to the other player with no validation. This makes it very easy for a player with some web-dev experience to cheat.