Play a game whose entire code fits inside a tweet


#1

[Read the post]


#2

He slightly cheated by using a js minifier. It was either javascriptcompressor or his tricks are so close he emulated it.

Plus considering it is missing required elements to be well formed, you might as well drop some of those unnecessary quotes :smile:

(Now to go write my own…)


#3

I did 43 … ( with a little bit help from iMacros xD )


#4

On first pass this is my cheat code:

function p(){window.setTimeout("p();",0);document.getElementsByTagName("p")[0].click()};p()

But I can probably optimize that better… I got 1998 clicks


#5

I got ~450000 clicks, but perhaps clicking again before the browser has had a chance to re-render is a bit unfair:

(function(e){do{e.click()}while((d(s)-t)<=15e3)})(document.body.firstChild)

#6

Come on, you know better. setInterval. Plus this is more like the kobyashi maru, the best way is not to play.

Document.getElementsByTagName(‘body’)[0].innerHTML=“

u r sexy winnar

”; window.location=“http://goatse.cx”;

#7

Good question. I’m not sure what is fair here, ultimately you could just

e=500000000

#8

It’s so obvious, I can totes make a game in a tweet.

<body>
<iframe src="oldschool.runescape.com">     
</iframe>
</body>

#9

you’re right setInterval is far superior, don’t know what I was thinking.


#10

Just a little friendly, chummy grief :smile:

I was thinking of a game that would use randomly timed closures to change the background quickly–click on blue and you get a point. But 140 chars? That’s tough.

But if you ran your main closure generator really tight you could squeeze the resources out of cheat loops :smile:


#11

For Sale: Baby Shoes, Click Here.

[Spoiler: if you win the game, you have an opportunity to purchase baby shoes.]

See also http://survex.com/~olly/rheolism/dsm_rheolism/ .


#12

So in general should we call it tct (turing complete tweets)?


#13

For those actually playing it as a game, try it on a tablet - it cuts down the seek time to use your finger instead of a mouse.


#14

I was a bit surprised to find it wasn’t written in APL.


#15

Given enough code monkeys Tweeting game source code, It’s only a matter of time before the Feds designate one of the programs as a munition and haul the programmer into court.


#16

Back in my day, we had Obfuscated C


#17

What? No, that’s perfectly clear and understandable javascript. The only think that makes it look like it’s been minified is the use of single letters as variable names, but of course you’re going to do that if you’re going to fit it into a tweet. I guarantee that no javascript programmer would have needed to use a minifier on that.

Also, besides a “missing” unnecessary semicolon at the end, I’m not sure what’s malformed about it, nor what quotes are unnecessary (the ones inside the onclick function are needed because they form a string, and then you need to wrap the onclick in quotes because of the internal quotes or you’ll get a syntax error).


#18

You big nerds. •ᴗ•


#19

Annnnnd… here’s the first nude mod.

<body onload=d=Date.now,t=d(s=0)><p style="float:left" onclick="(e=d(++s)-t)<15e3?style.margin=e%300+' 0 0 '+e*7%300:alert(s)">(o)(o)</p></body>

#20

No, I checked. The var names and his min’ed operators are exactly the same style of output as two js min’ers online. I never said obfuscated, and it is also reasonable to argue that one who uses minifiers may take up some techniques they observe.