A simple infinite runner. Use your mouse or touch the screen to change the position of the ship. Avoid the asteroids
for(_='`hsl(~x[3]/W50V);Ui/40+1TV)/(T)UR[1]Q,pQP0.O;iNMath.LLrandom()K(K-.5)*J.push([IIJw,Jh,H),G100EE)/(TG(pQD/2x[2]-x[3])/,[0],xQ,,Lhypot(a.width=[];=>20for(i=0N<t/V00)%e.client(x+m)](N++)uIp+0,c[c.fy]= (C+mQ],[Rl(p+Dc.stroke()"#fff".mapO08;baUm(p-Di in c)c[i+[i[6]]]=i;w=;h=a.height;p=[0];es0N++)sHK*2+1]Ua.onmousemove=ep=[X-w,Y-h];a.style.backgroundColor="#000";(l=t{|=0;taw,hU ;sfcx)UC=3-(;C>;C-=)for=-1;x<1;x+=)baG[[0,0,0]].map(ml*w/G(h/6+Lsin**2*60+)**2*V-10/Labs-O6,+1-.5))/))G ~E%,${+1)*30+30}%`,c.fill(G;uK<O12&&eH]Ue=e.filter>O3Ue(uIx~${30-},E%,%`]G-=O2)UiP+i,T,40-i,]U[[-10-V10V-10V10-V]]{i=2N<7xP+xQ,(TG2])}Uu.sort(,b)b[2]-)( x[4],fcQW,W))UsS]=;ld]=N=2-+R+-R; ;fx(t/E0).toFixed(1)+`s`,-w+1-h+Ue.some<1.5&&p-xP-xQ)<E)||requestAnimationFrame(l)})(0)';G=/[^ -CFMSX-}]/.exec(_);)with(_.split(G))_=join(shift());eval(_)
Zm9yKF89J2Boc2wofnhbM10vVzUwVik7VWkvNDArMVRWKS8oVClVUlsxXVEscFFQMC5PO2lOTWF0aC5MTHJhbmRvbSgpSyhLLS41KSpKLnB1c2goW0lJSncsSmgsSCksRzEwMEVFKS8oVEcocFFELzIfeFsyXR4teFszXR8pLx4sHVswXRwcLHhRLB4sG0xoeXBvdCgaYS53aWR0aBk9W107GD0+FzIwFmZvcigVFWk9ME48FhR0L1YwMCklE2UuY2xpZW50Eih4ERErbRwpEF0oD04rKyl1SXAcKw4wLAxjW2MuCwtmeV09CShDK21RCF0sWwdSC2wPKH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push([(Math.random() - .5) * w, (Math.random() - .5) * h, Math.random() * 2 + 1]);
a.onmousemove = e => p = [e.clientX - w / 2, e.clientY - h / 2];
a.style.backgroundColor = "#000";
(l = t => {
a.width |= 0;
c.translate(w / 2, h / 2);
c.fillStyle = "#fff";
s.map(x => c.fillRect(x[0], x[1], x[2], x[2]));
for (z = 3 - (t / 2000) % 0.08; z > 0.08; z-= 0.08)
for (x = -1; x < 1; x += 0.08)
c.beginPath(),
[[0, 0], [0.08, 0], [0.08, 0.08], [0, 0.08], [0, 0]].map(m => c.lineTo((x + m[0]) * w / 2 / (z + m[1]), (h / 6 + Math.sin(x + m[0]) ** 2 * 60 + (z + m[1]) ** 2 * 50 - 10 / Math.hypot(Math.abs(x + m[0]) - 0.6, (z + m[1] + t / 2000) % 1 - .5)) / (z + m[1]))),
c.fillStyle = `hsl(200, 100%, ${(x+1)*30+30}%`,
c.fill(),
c.stroke();
u = [];
Math.random() < 0.2 * a.width / 1000 && e.push([(Math.random() - .5) * w, (Math.random() - .5) * h, 20]);
e = e.filter(x => (u.push([x[0], x[1], x[2], 200, `hsl(${40 - 2 * x[2]}, 100%, 20%`, 1]), x[2] -= 0.2, x[2] > 0.3));
for (i = 0; i < 80; i++) u.push([p[0] + i / 8, p[1] + i / 2, i / 160 + 1, 40 - i / 4, "#fff", 0]);
[[-100, -50], [100, 50], [-100, 50], [100, -50]].map(x => {for(i = 2; i < 22; i++) u.push([p[0] + x[0], p[1] + x[1], (i / 160 + 1), 20, "#fff", 0])});
i = 2, _ = 1,
u.sort((x, b) => b[2] - x[2]).map(x => (
x[2] < i / 160 + 1 && _ && (
c.strokeStyle = "#fff",
c.lineWidth = 20,
[[-100, -50], [100, 50], [-100, 50], [100, -50]].map((x, y) => c[["moveTo","lineTo"][y % 2]]((p[0] + x[0]) / (i / 160 + 1), (p[1] + x[1]) / (i / 160 + 1))),
c.stroke(),
_ = 0
),
c.fillStyle = x[4],
c.lineWidth = 1,
c.strokeStyle = "black",
c.fillRect((x[0] - x[3] / 2) / x[2], (x[1] - x[3] / 2) / x[2], x[3] / x[2], x[3] / x[2]),
x[5] && c.strokeRect((x[0] - x[3] / 2) / x[2], (x[1] - x[3] / 2) / x[2], x[3] / x[2], x[3] / x[2]))
);
c.fillStyle = "#fff";
c.fillText((t / 1000).toFixed(1) + `s`, -w / 2 + 10, -h / 2 + 20);
e.some(x => x[2] < 1.2 && x[2] > 1 && Math.hypot(p[0] - x[0], p[1] - x[1]) < 100) || requestAnimationFrame(l)
})(0)