d=document;l=localStorage;s=a.width=a.height=128;p=(z=-s)*6.5;q=w=0;b.onkeydown=(e)=>z={w:-s,a:-1,s:s,d:1}[e.key]||top.reload();setInterval(_=>{r=x=>x*4+3&s*s*4-1;g=x=>u.data[r(i+x)];f=x=>q.data[r(x)]=255;u=q;q=c.createImageData(s,s);for(i=s*s;--i;((!(i&s-1)||s*(s-2)<i&&i&2)||m==765?255:m==510?g(0):0)&&f(i))m=g(1)+g(-1)+g(s)+g(-s)+g(1+s)+g(1-s)+g(s-1)+g(-s-1);if(g(p+=z))for(;i++<s*s;)f(i);else[p-z-z,p-z,p,j=p-.75,j-z].map(f,t.innerHTML=`
<b>JS1K game by solsort.com
Press Space to start
Steer using W A S D
Avoid obstacles
High Score: ${v=Math.max(w,+l.getItem(0))}
Score: `+w++);l.setItem(0,v);c.putImageData(q,0,0)},50);d.write('<pre id=t style=position:fixed;top:0;color:#0a0;width:100%;text-align:center>');a.style.imageRendering='pixelated'
ZD1kb2N1bWVudDtsPWxvY2FsU3RvcmFnZTtzPWEud2lkdGg9YS5oZWlnaHQ9MTI4O3A9KHo9LXMpKjYuNTtxPXc9MDtiLm9ua2V5ZG93bj0oZSk9Pno9e3c6LXMsYTotMSxzOnMsZDoxfVtlLmtleV18fHRvcC5yZWxvYWQoKTtzZXRJbnRlcnZhbChfPT57cj14PT54KjQrMyZzKnMqNC0xO2c9eD0+dS5kYXRhW3IoaSt4KV07Zj14PT5xLmRhdGFbcih4KV09MjU1O3U9cTtxPWMuY3JlYXRlSW1hZ2VEYXRhKHMscyk7Zm9yKGk9cypzOy0taTsoKCEoaSZzLTEpfHxzKihzLTIpPGkmJmkmMil8fG09PTc2NT8yNTU6bT09NTEwP2coMCk6MCkmJmYoaSkpbT1nKDEpK2coLTEpK2cocykrZygtcykrZygxK3MpK2coMS1zKStnKHMtMSkrZygtcy0xKTtpZihnKHArPXopKWZvcig7aSsrPHMqczspZihpKTtlbHNlW3Atei16LHAteixwLGo9cC0uNzUsai16XS5tYXAoZix0LmlubmVySFRNTD1gDQo8Yj5KUzFLIGdhbWUgYnkgc29sc29ydC5jb20NCg0KUHJlc3MgU3BhY2UgdG8gc3RhcnQNClN0ZWVyIHVzaW5nIFcgQSBTIEQNCkF2b2lkIG9ic3RhY2xlcw0KDQpIaWdoIFNjb3JlOiAke3Y9TWF0aC5tYXgodywrbC5nZXRJdGVtKDApKX0NClNjb3JlOiBgK3crKyk7bC5zZXRJdGVtKDAsdik7Yy5wdXRJbWFnZURhdGEocSwwLDApfSw1MCk7ZC53cml0ZSgnPHByZSBpZD10IHN0eWxlPXBvc2l0aW9uOmZpeGVkO3RvcDowO2NvbG9yOiMwYTA7d2lkdGg6MTAwJTt0ZXh0LWFsaWduOmNlbnRlcj4nKTthLnN0eWxlLmltYWdlUmVuZGVyaW5nPSdwaXhlbGF0ZWQnDQo=
Original source not submitted