You are red. Eat all the others. Click to create new cell within your body. Hold to expand it. You spawn on the left. Do not get eaten yourself. The bigger the window, the better.
for(_=',1~c.We.rV,y:U){TfunctionO=O(bTN=n(b,M1=Me)Lb.KKrJ(f)*JHRect(Gdwn=!F=dE),D.tC(e=gC[B&&A],@.length??;++=0;Cff<dfrandom()*floor(;breakTk=!0}mXUmYa.width.push({=Kclienta.height=P[;elseC.splice(EC[var NF=abs(KWfill onmousefor(if(,r:8,t:30})Cx:GKx-8,Ky-8~6~6);mXX;mYY};P=[]m32>m;++m)Pa:"hsl("+10*m+",99%,50%)",t:[]}DP[m]m*/32U;I0];F1;mY=mXdown0;moveNup1;O n(b,hTdx-h.xDfy-h.yDer+h.r);return d*d+f*f<=e*e}setInterval(O(TWclearG0,0,,)b,hh<PhTbh]; Style=Kad=b,)bf@WbeginPath(DWarc(Kx,Ky,J,0,6.28D ();Te;bf]k=!1,ll<dlTel@0==fb!=eAL}0==k)df~){g;ll<Pl)gl@g!E)kk<gk)Bk@L)AJ>VA(V-=2,J--,8>V)Tgk~)}0>--bCA(bC=30);Wstroke; }}I!EA0<dC?)bdC?-1@99>J)J+=4{gE;g=E;)gP?)];0<gC?ABgC?)@f=atan2(e.y-Ky,e.x-KxDdKx+cosHUKy+sinH)}}a:0!EwnTh=!1;e0];gg<eg)b=eC[g@d={x:,r:-J+8}~!Md))d.r=0,h|Md) 99>JTJ+=9 a}1==hAe}},30);';G=/[^ ->IPRSX-}]/.exec(_);)with(_.split(G))_=join(shift());with(Math)eval(_)
Zm9yKF89JywxfmMuV2UuclYseTpVKXtUZnVuY3Rpb25PPU8oYlROPW4oYixNMT1NZSlMYi5LS3JKKGYpKkpIUmVjdChHZHduPSFGPWRFKSxELnRDKGU9Z0NbQiYmQV0sQC5sZW5ndGg/PzsrKx89MDseQx8dZh5mPGQdZhxyYW5kb20oKSobZmxvb3IoGxo7YnJlYWsZVGs9ITAZfRhtWFVtWRdhLndpZHRoFi5wdXNoKHsVPUtjbGllbnQUYS5o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sKF8p
// Spawn - (c) Arcade Badgers 2019
// Written by Steven Campbell
// @ArcadeBadgers @stuckieGAMEZ
// Well, it was meant to be a strategy game with totem placement generating power to build more and take over the land
// Ended up turning into an arcade-style thing in the end to get it under the 1k.. and relatively amusing
players = [];
for (var i = 0; i < 32; ++i) {
players.push({c: "hsl(" + (10 * i) + ",99%,50%)" // colour
, t: [] }); // totems)
players[i].t.push({ x: i * a.width / 32, y: Math.random() * a.height, r: 8, t: 30});
}
I = players[0];
dwn = false;
mX = 0;
mY = 0;
onmousedown=e=>{
dwn = true;
mX = e.clientX;
mY = e.clientY;
};
onmousemove=e=>{
mX = e.clientX;
mY = e.clientY;
};
onmouseup=e=>{
dwn = false;
mX = e.clientX;
mY = e.clientY;
};
/*
ontouchdown=e=>{
var t = e.touches[0];
dwn = true;
mX = t.clientX;
mY = t.clientY;
};
ontouchmove=e=>{
var t = e.touches[0];
mX = t.clientX;
mY = t.clientY;
};
ontouchup=e=>{
var t = e.touches[0];
dwn = false;
mX = t.clientX;
mY = t.clientY;
};
*/
var inputdown = function() {
if (false == dwn) return;
var newTotem = false;
var p = players[0];
for (var j = 0; j < p.t.length; ++j) {
var t = p.t[j];
var u = { x: mX, y: mY, r: -t.r+8 }
if (true == areaInArea(t, u)) {
if (t.r < 99) { t.r+=9; return; }
} else {
u.r=0;
newTotem |= areaInArea(t, u);
}
}
if (true == newTotem) p.t.push({ x: mX, y: mY, r: 8, t: 30});
};
var areaInArea = function(t, u) {
var dx = Math.abs( t.x - u.x );
var dy = Math.abs( t.y - u.y );
var dr = Math.abs( t.r + u.r );
return ((dx*dx + dy*dy) <= dr*dr);
}
var process = function(p) {
for (var i = 0; i < p.t.length; ++i) {
var t = p.t[i];
c.beginPath();
c.arc(t.x, t.y, t.r, 0, 2*3.14);
c.fill();
}
for (var i = 0; i < p.t.length; ++i) {
var t = p.t[i];
var isSafe = false;
for (var j = 0; j < p.t.length; ++j) {
var u = p.t[j];
if (0 == i) { isSafe = true; break; }
if (t == u) continue;
if (true == areaInArea(t, u)) { isSafe = true; break; }
}
if (false == isSafe) {
p.t.splice(i, 1);
continue;
}
for (var j = 0; j < players.length; ++j) {
var e = players[j];
if (e == p) continue;
for (var k = 0; k < e.t.length; ++k) {
var u = e.t[k];
if (true == areaInArea(t, u)) {
if (t.r > u.r) { u.r -= 2; t.r--; }
else continue;
if (u.r < 8) {
e.t.splice(k, 1);
break;
}
}
}
}
if (--t.t < 0) t.t = 30;
c.strokeRect(t.x-8, t.y-8, 16, 16);
c.fillRect(t.x-8, t.y-8, 16, 16);
}
if ((I != p)
&& (0 < p.t.length)) {
var t = p.t[p.t.length - 1];
if (t.r < 99) t.r += 4;
else {
var e = p;
while (e == p) e = players[Math.floor(Math.random() * players.length)];
if (0 < e.t.length) {
var u = e.t[Math.floor(Math.random() * e.t.length)];
var dx = (u.x - t.x);
var dy = (u.y - t.y);
var a = Math.atan2(dy, dx);
var px = t.x + Math.cos(a) * t.r;
var py = t.y + Math.sin(a) * t.r;
p.t.push({ x: px, y: py, r: 8, t: 30});
}
}
}
}
setInterval(function() {
c.clearRect(0, 0, a.width, a.height);
for (var i = 0; i < players.length; ++i) {
var p = players[i];
c.fillStyle = p.c;
process(p);
}
inputdown();
}, 30);