The definition of what constitutes a game has become broader in recent years, and now a clever developer has boiled down the code for a game to the size of a single tweet.
Musician and computer programmer Alex Yoder took on a Twitter challenge from game developer Ben Porter (best known for his work with Pixel Dailies) to write a game that could have its code housed in a single, 140-character tweet.
I challenge you to make a game whose source fits in a single tweet
— Ben Porter (@eigenbom) June 27, 2015
Yoder’s response fit the bill.
Well here’s my attempt at @eigenbom‘s challenge to make a game who’s source fits in 1 tweet: https://t.co/QpLOFoXnsz pic.twitter.com/CBr9UMGvh3
— Alex Yoder (@akoluthic) June 29, 2015
<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
— Alex Yoder (@akoluthic) June 29, 2015
The game, called Tiny Twitch, is about as simple as they come. An X appears on screen. When a player clicks on it, the X jumps to a new position on the screen. Every time it is clicked, it relocates. The challenge is to see how many times you can click it before time expires.
Since posting the code on GitHub, Yoder has received several suggestions for modifying the game while remaining within the 140-character limit. He said in a tweet that he has since fixed a bug and improved movement, all while cutting down the game’s size thanks to the input of others.
With everyone’s help, we’ve fixed a bug and allowed the X to move around more (after cutting 48 bytes from the original!)
— Alex Yoder (@akoluthic) June 30, 2015
While Yoder wasn’t the only one to successfully complete the challenge, Porter gave Tiny Twitch his endorsement after playing it.
The best single tweet game yet!https://t.co/XxKZES9uFo
— Ben Porter (@eigenbom) June 30, 2015
If you want to give Tiny Twitch a try, you can play it on Yoder’s website. It might not have the fancy graphics, epic story, unlockable achievements, or online multiplayer experience that people have come to expect from modern video games, but it’s still just as much of a game as the latest blockbuster title.
H/T Rock, Paper, Shotgun | Illustration by Max Fleishman