url-tetris

tetris inside the browser address bar
git clone https://tongong.net/git/url-tetris.git
Log | Files | Refs | README

commit 16f00750c14aebcead9821cbcfa01d8ce1fdf7bf
parent be3578ac63f9bc1f6519117988ba5d2ecc7b1ff0
Author: tongong <tongong@gmx.net>
Date:   Mon,  1 Jun 2020 13:40:37 +0200

added readme

Diffstat:
AREADME.md | 43+++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -0,0 +1,43 @@ +# url-tetris + +This is a version of the popular Tetris game running in your address bar! + +[View Demo](https://url-tetris.tongong.now.sh/) + +## Controls + +<table style="text-align: center;"> + <tr> + <td>W or ⬆️</td> + <td>Move upwards</td> + </tr> + <tr> + <td>A or ⬅️</td> + <td>Move leftwards</td> + </tr> + <tr> + <td>S or ⬇️</td> + <td>Move downwards</td> + </tr> + <tr> + <td>D or ➡️</td> + <td>Rotate</td> + </tr> + <tr> + <td>SPACE</td> + <td>Start the game</td> + </tr> +</table> + +## How does it work + +This project was made in vanilla JavaScript. With the [History.replaceState()](https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState) method the current url can be changed without reloading the page. For the graphics [Braille Patterns](https://en.wikipedia.org/wiki/Braille_Patterns) are used. + +## Browser support + +I tested the game with Firefox and Chrome for both Linux and Android. Desktop Firefox works perfectly. Chrome behaves weirdly: some Unicode characters are percent-encoded in the url, some aren't. On both of the tested Android browsers all Unicode characters are percent-encoded. That's why I didn't add mobile controls. + +## Inspired by + +- [URL Hunter](http://probablycorey.com/url-hunter) +- [Flappy Braille](http://flappybraille.ndre.gr)