Skip to main content

Slim, Fast: Tetris & Snake In 140 Bytes

This is amazing! Well, the game itself - a hobbled, ASCII-esque version of Tetris with only two block types - isn't amazing, but the fact that it comprises just 140 bytes is. 140 bytes in this instance also means 140 characters, so essentially this is a working game you could post on Twitter.

Play it in your browser here, then come back here and marvel that the below is all that's involved:

function(a,b,c,d,e){return d+=c,
e=a|b<

That's Javascript, so it's calling up various higher functions and... oh, I'm too stupid to understand, but I know that it's damned clever. Admittedly there does appear to be some cheating going on, in that input and display are handled separately: you can comb through the code and discussion here.

It's part of a project/contest called 140byt.es, which has also generated a similarly svelte and smart take on Snake.

These people. They are clever people. I am not. I feel bad now.

Read this next