25th February 2024 9:23 am
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

This game’s source code fits into a single tweet

A lot of gamers know that game development is a complicated affair that results in millions of lines of code. But at least one developer has figured out a way to make a fully-functional, somewhat-fun game using fewer than 140 characters. 137 characters (with spaces), to be exact.

That developer is Alex Yoder and the game is Tiny Twitch, a browser game that was made using a combination of Javascript and HTML code. Specifically, this code:

<script>var e,s=0,t=Date.now();function f(){((e=Date.now()-t)<15000)?a.style.margin=++s+e%300:alert(s)}</script><p id=”a” onclick=”f()”>X

Tiny Twitch isn’t exactly Gears of War – or even Pong (or indeed anything else, really – ed.) – but it’s brilliant in its simplicity. All you need to do is click an X as fast as you can, which disappears and reappears on your screen with every successful click. After 14 seconds or so, a popup tells you how many times you managed to click on the X. That’s it.

Try it out, at least for a few seconds, and marvel at the simplicity and elegance of Yoder’s code.

Great job, Alex!

[Source – Hacker News]

Popular News

Subscribe to our newsletter

Select list(s):

We don’t spam! Read our privacy policy for more info.