Flatland is under attack by the Rectangulons and you must dip, dive, dodge, and evade your way to the highest of scores lest you become crushed into a 1 dimensional line as your 2D mass explodes into…
for(_='=>^()L=L^Kc.JJfillZwhichYonkeyXspeedW&&]x+let=thupdate00f[y+=e=.5t[]}, ${Jshadow10 Enter").splice(*lLh("#], 0,),Z"Rect(fff"Text(is.,255|0circst e=Ma,l.random,=[ s=x=y=r=1,f=[0 h^ZSty,oK({x:e.floor(1e3y:-156,W:(lL+.1)/5+s/1e5,:functionL{y=W,d01x,y,75,156)}}d^Blur,nK[37,27,2+5*l(-5,-5 p^{d(2Jfon"bold 30px Impact",e,432,4)},uK{if(r){for(d(0i=0;i<.ng;i++){t [i];JbeginPa(Jarc(0 1 2 2*e.PI,!1h(`rgba(${567]}, 0.9)`(0]+=3 1]+=4 2]-=.02,2]<2+.1(lL<.05?[i]=n(x,y):i,1))}p("GAME OVER -}else s+=1,ccc88!8t.push(oL39x<06?:37x>0(x-38y>?y-:40y<726(1cbx,y,74,54t.some(c^Jx<60J75>14J124>yJ78<54)(=[...Array(9)].map(nr=1);d(30t.forEach((c,e)^Jy>8?te,1):JLs/|5,30setInterval(u,50)};Xdown=(({Y:c})^13==cr?(r=s=[ x=37y=68void uL):c]=1Xup=(c^JY]=0a.heigh80a.wid=8Color="#0",p("Press;';G=/[-W-ZJ-L^]/.exec(_);)with(_.split(G))_=join(shift());eval(_)
Zm9yKF89Jz0+XigpTD1MXktjLkpKZmlsbFp3aGljaFlvbmtleVhzcGVlZFcmJh9dHx54Kx1sZRx0PRt0aBp1cGRhdGUZMDAYZlsXeSsWPWUVPS41FHRbE119LCAkexMSSnNoYWRvdxExMBAgRW50ZXIiKQ8uc3BsaWNlKA4qbEwMaCgiIwtdLAkwLAgpLAcHWgYiBlJlY3QoBQtmZmYiBlRleHQoBBppcy4DLDI1NQx8MAJjaXJjHHMBHHQgZT1NYRosbBUucmFuZG9tLBsBPVsJcz14PXk9CHI9MSxmPVswCWgVXlpTdHkcFSxvSyh7eDplLm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= 1,
k = [0],
s = 0.5,
fS = o => c.fillStyle = o,
Enemy = () => ({
x: m.floor(r()*(1e3)),
y:-156,
speed: (r() + 0.1)/5 + score/1e5,
update: function(){
this.y = this.y + this.speed;
fS('#d01');
c.fillRect(this.x, this.y, 75, 156);
}
}),
shadowBlur = blur => c.shadowBlur = blur,
Circle = () => [
x + 37,
y + 27,
2 + r()*5,
-5 + r()*10,
-5 + r()*10,
r()*255|0,
r()*255|0,
r()*255|0,
],
drawText = t => {
shadowBlur(2);
c.font = 'bold 30px Impact';
fS('#fff');
c.fillText(t, 432, 400);
},
start = () => {
canStart = score = 0;
enemies = [];
x = 370;
y = 680,
gameLoop();
},
gameLoop = () => {
if(!canStart) {
score += 1;
// set background
fS('#ccc');
c.fillRect(0, 0, 1080, 800);
// fill enemies
!enemies[8] ? enemies.push(Enemy()) : 0;
// change the player's coords
(k[39] && x < 1006) ? x+=s: (k[37] && x > 0) ? x-=s : 0;
(k[38] && y > 10) ? y-=s : (k[40] && y < 726) ? y+=s : 0;
fS('#1cb');
c.fillRect(x, y, 74, 54);
// detect collision
if(enemies.some(e =>
e.x < x + 60 &&
e.x + 75 > x + 14 &&
e.y + 124 > y &&
e.y + 78 < y + 54
)) {
circles = [...Array(900)].map(Circle);
canStart = 1;
}
} else {
shadowBlur(0);
for (i = 0; i < circles.length; i++){
let q = circles[i];
c.beginPath();
c.arc(q[0], q[1], q[2], 0, m.PI*2, false);
fS(`rgba(${q[5]}, ${q[6]}, ${q[7]}, 0.9)`);
c.fill();
q[0] += q[3];
q[1] += q[4];
q[2] -= .02;
if(q[2] < 2 + r()*0.1) r() < 0.05 ? circles[i] = Circle(x,y) : circles.splice(i, 1);
};
drawText('GAME OVER - Enter');
}
shadowBlur(30);
enemies.forEach((e, i) => e.y > 800 ? enemies.splice(i,1) : e.update());
fS('#fff');
c.fillText(score/10|0, 5, 30);
setInterval(gameLoop,50)
};
onkeydown = ({which:w}) => w == 13 && canStart ? start() : k[w]=1;
onkeyup = x => k[x.which]=0;
a.height = 800;
a.width= 1080;
c.shadowColor = "#000";
drawText('Press Enter');