PoC for playing tetris (multiplayer) with smartphones as controllers
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
public
src
static
.gitignore
.travis.yml
LICENSE
README.md
config-sample.js
nwb.config.js
package-lock.json
package.json

README.md

Multiplayer Tetris

PoC for a multiplayer tetris game. Two smartphones connect via webrtc to a third webrtc client where two tetris boards are rendered. The player that lasts the longest wins.

Multiplayer Tetris screenshot

How to play

Start a dev server (see below) or any server with a build (see below too) and then connect two players that send swipe events via webrtc (swipe-left, swipe-up. swipe-right & swipe-down).

You can use this app to do so: https://github.com/AquiGorka/simple-webrtc-events-peer (if you are using such app please include the following query param pid=server so that all the peers connect to the same namespace)

Dev

npm i
npm start

Build

npm run build

WebRTC support

Uses PeerJS to contact peers with each other. To make this work add your own PeerJS Api Key

Demo

Board (open this in your computer): http://multi-tetris.surge.sh

Controllers (open in Android smartphone or Chrome/Firefox in desktop): http://swipe.surge.sh/?pid=server