This is a JavaScript port of the old DOS game Scorched Earth. The goal is to make the enemy player fall from the bottom of the screen by destroying the landscape. To shoot, click anywhere on the scree…
with(Math){for(k in a)a[k[0]+k.replace(/[^A-Z]/g,"")]=a[k];W=300;H=150;B="#000";G="#800";F="fillStyle";R=random;S=sin;T=setTimeout;U=R();V=R();l=[];t=0;a[F]=B;a.fR(0,0,W,H);a[F]="#FF0";for(i=H;i--;)a.fR(W*R(),H*R(),1,1);for(x=W;x--;){y=(S(13*(x/W+U))+S(6*(x/W+V))+3)*H/6;a[F]="#EEE";a.fR(x,H-y,1,y);a[F]="#080";if(R()<.2)a.fT("↟",x-4,H-y+2)}d=a.gID(0,0,W,H);function C(x,y,r,f,t){a.bP();a.a(x,H-y,r,f,t,0);a.fill()};function P(x,y){return d.data[4*(W*(H-~~y)+~~x)+2]};for(i=2;i--;)l[i]={x:(i+.5)/2*W,y:H};(function f(){for(i=2;i--;){p=l[i];a[F]=B;C(p.x,p.y,9,PI,0);for(j=-2;j<4;j+=2)if(!P(p.x+4*j,p.y)){p.y-=(!!j);p.x+=j};a[F]=G;C(p.x,p.y,8,PI,0);if(p.x<0||W<=p.x||p.y<-8){alert("P"+i+" won");T=R}}T(f,10)})();d=a.gID(0,0,W,H);a[F]=R,c.onclick=function(e){var p=l[t],x=p.x,y=p.y+8,h=(e.layerX-x)/30,v=(H-y-e.layerY)/30;t=1-t,(function f(){a.fR(x,H-y,2,2);do{x+=h;y+=v}while(x<0||W<x?h=-h:H<y?v=-v:0);v-=.05;if(P(x,y)){a[F]=G;C(x,y,16,0,7);T(function(){a[F]=B;C(x,y,17,0,7);d=a.gID(0,0,W,H)},H)}else T(f,10)})()}}
d2l0aChNYXRoKXtmb3IoayBpbiBhKWFba1swXStrLnJlcGxhY2UoL1teQS1aXS9nLCIiKV09YVtrXTtXPTMwMDtIPTE1MDtCPSIjMDAwIjtHPSIjODAwIjtGPSJmaWxsU3R5bGUiO1I9cmFuZG9tO1M9c2luO1Q9c2V0VGltZW91dDt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