memoscan
← all memos

Memo 0xb7177681…c1ceec on Ethereum

0x6fd69073…9a78·#25,052,938·view on Etherscan
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' wi<rect width='400' height='400' f<line x1='0' y1='66' x2='400' y2`Rm='66' stroke='`<line x1='0' y1='133' x2='400' yo2='133' stroke='`<line x1='0' y1='200' x2='400' yo2='200' stroke='`<line x1='0' y1='266' x2='400' yo2='266' stroke='`<line x1='0' y1='333' x2='400' yo2='333' stroke='`<line x1='66' y1='0' x2='66' y2=m'400' stroke='`<line x1='133' y1='0' x2='133' yo2='400' stroke='`<line x1='200' y1='0' x2='200' yo2='400' stroke='`<line x1='266' y1='0' x2='266' yo2='400' stroke='`<line x1='333' y1='0' x2='333' yo2='400' stroke='`<circle cx='60' cy='40' r='1.5' `fill='white' opacity='.7'/><circle cx='180' cy='90' r='1' f`ׂill='white' opacity='.5'/><circle cx='310' cy='55' r='2' faill='white' opacity='.6'/><circle cx='80' cy='160' r='1.2'a fill='white' opacity='.4'/><circle cx='340' cy='200' r='1.5a' fill='white' opacity='.5'/><circle cx='120' cy='280' r='1' afill='white' opacity='.6'/><circle cx='260' cy='320' r='1.8a' fill='white' opacity='.4'/><polygon points='100,80 116,108 a84,108' fill='#ff3d00' filter='ua<polygon points='290,110 308,140a 272,140' fill='#d500f9' filter=a<circle cx='200' cy='95' r='18' afill='#ff1744' filter='url(#eg)'a<circle cx='200' cy='95' r='8' fa<filter id='sg' x='-60%' y='-60%a' width='220%' height='220%'><feGaussianBlur stdDeviation='4'a<filter id='eg' x='-40%' y='-40%` ' width='180%' height='180%'><feGaussianBlur stdDeviation='3'`F<rect x='197' y='145' width='6' `Rxheight='16' rx='3' fill='`8<rect x='181' y='160' width='6' xheight='16' rx='3' fill='`8<rect x='213' y='160' width='6' Rxheight='16' rx='3' fill='`8<ellipse cx='200' cy='290' rx='1p8' ry='22' fill='`x<polygon points='192,278 208,278w 205,305 195,305' fill='`@<polygon points='196,278 204,278 202,292 198,292' fill='white' o<polygon points='200,220 222,272 214,278 200,268 186,278 178,272<polygon points='178,272 158,278o 168,258' fill='`<polygon points='222,272 242,278o 232,258' fill='`<ellipse cx='200' cy='248' rx='7' ry='12' fill='rgba(255,255,255<text x='200' y='370' font-family='monospace' font-size='22' fonut-weight='bold' fill='`P' text-anchor='middle' letter-spacing='4' opacity='.9'>RAPID FIRa<!doctype html><html><head><meta<meta name='viewport' content='width=device-width,initial-scale={margin:0;padding:0;box-sizing:;overflow:hidden;font-family:mon`canvas{display:block;margin:autoa#hud{position:fixed;top:10px;lefa;font-size:13px;text-shadow:0 0 ;pointer-events:none;line-height#title{position:fixed;top:10px;r;font-size:15px;font-weight:bold;letter-spacing:3px;text-shadow:^u;pointer-events:none;}`P#wpn{position:fixed;bottom:14px;`left:10px;color:#fff;font-size:1`Ղ2px;opacity:.7;pointer-events:no`<div id='hud'><span id='sc'>SCORaE: 0</span><br><span id='lv'>LEVaEL: 1</span><br><span id='hp'>SHa<div id='title'>RAPID FIRE</div>avar W=window.innerWidth,H=windowvar cv=document.getElementById('c');cv.width=W;cv.height=H;var ctx=cv.getContext('2d');var score=0,level=1,shields=100,`RngameOver=false;`var ship={x:W/2,y:H*0.72,w:36,h:`Jvar bullets=[],enemies=[],stars=`s[],particles=[],upgrades=[];var keys={},lastFire=0,lastSpawn`Rx=0,spawnRate=1400,tick=0;`8(function(){for(var i=0;i<120;i+`+){stars.push({x:Math.random()*Wa,y:Math.random()*H,r:Math.randoma()*1.5+.3,s:Math.random()*1.5+.4aRx,b:Math.random()});}})();`8document.addEventListener('keydo` wn',function(e){keys[e.key]=true;if(e.key==='ArrowLeft'||e.key==``='ArrowRight')e.preventDefault()`document.addEventListener('keyup`',function(e){keys[e.key]=false;`ĂRovar touchX=null;`cv.addEventListener('touchstart'`,function(e){touchX=e.touches[0]aRq.clientX;},false);`pcv.addEventListener('touchmove',afunction(e){touchX=e.touches[0].aclientX;e.preventDefault();},{paaRmssive:false});`cv.addEventListener('touchend',faunction(){touchX=null;},false);Rvfunction drawShip(x,y){`H ctx.save();ctx.translate(x,y);a var tg=ctx.createRadialGradienaRqt(0,18,2,0,18,22);`p tg.addColorStop(0,TC_str);tg.aaddColorStop(1,'transparent'); ctx.fillStyle=tg;ctx.beginPatha();ctx.ellipse(0,20,14,18,0,0,MaaRsth.PI*2);ctx.fill();`` var fl=10+Math.sin(tick*0.3)*4a ctx.fillStyle=TC_str;ctx.globaa ctx.beginPath();ctx.moveTo(-8,a16);ctx.lineTo(8,16);ctx.lineTo(a4,16+fl);ctx.lineTo(-4,16+fl);ctaRxx.closePath();ctx.fill();`8 ctx.globalAlpha=0.5;ctx.fillSta ctx.beginPath();ctx.moveTo(-4,a16);ctx.lineTo(4,16);ctx.lineTo(a2,16+fl*0.5);ctx.lineTo(-2,16+fla*0.5);ctx.closePath();ctx.fill()aRs ctx.globalAlpha=1;`` ctx.fillStyle=SC_str;ctx.shadoawBlur=18;ctx.shadowColor=SC_str;a ctx.beginPath();ctx.moveTo(0,-a22);ctx.lineTo(16,14);ctx.lineToa(10,18);ctx.lineTo(0,12);ctx.linaeTo(-10,18);ctx.lineTo(-16,14);catx.closePath();ctx.fill(); ctx.fillStyle='rgba(255,255,25a5,0.18)';ctx.shadowBlur=0; ctx.beginPath();ctx.ellipse(0,a-6,5,9,0,0,Math.PI*2);ctx.fill()awBlur=10;ctx.shadowColor=SC_str;aRsctx.globalAlpha=0.7;`` ctx.beginPath();ctx.moveTo(-16a,14);ctx.lineTo(-28,18);ctx.lineaTo(-20,8);ctx.closePath();ctx.fia ctx.beginPath();ctx.moveTo(16,a14);ctx.lineTo(28,18);ctx.lineToa(20,8);ctx.closePath();ctx.fill(a ctx.globalAlpha=1;ctx.shadowBlaRrur=0;ctx.restore();`hV[`@Qufunction drawEnemy(e){`P ctx.save();ctx.translate(e.x,e`6 ctx.shadowBlur=14;ctx.shadowCo`Zlor=e.col;ctx.fillStyle=e.col;Rp if(e.type===0){`x ctx.beginPath();ctx.moveTo(0`,-16);ctx.lineTo(14,10);ctx.line`ɄTo(-14,10);ctx.closePath();ctx.f` ctx.fillStyle='rgba(0,0,0,0.a4)';ctx.beginPath();ctx.ellipse(a0,-2,4,6,0,0,Math.PI*2);ctx.fillaRv }else if(e.type===1){`H,-18);ctx.lineTo(12,6);ctx.lineTao(6,14);ctx.lineTo(-6,14);ctx.lianeTo(-12,6);ctx.closePath();ctx.a ctx.beginPath();ctx.arc(0,0,a15,0,Math.PI*2);ctx.fill();35)';ctx.beginPath();ctx.arc(0,0a,7,0,Math.PI*2);ctx.fill(); ctx.shadowBlur=0;ctx.restore()aRwfunction spawnBullets(){`@ if(SPREAD===1){bullets.push({xa:ship.x,y:ship.y-22,vx:0,vy:-11,a else if(SPREAD===2){bullets.puash({x:ship.x-7,y:ship.y-18,vx:0,avy:-11,life:1});bullets.push({x:aship.x+7,y:ship.y-18,vx:0,vy:-11a else if(SPREAD===3){bullets.puash({x:ship.x,y:ship.y-22,vx:0,vya:-12,life:1});bullets.push({x:shaip.x-8,y:ship.y-16,vx:-1.5,vy:-1a0,life:1});bullets.push({x:ship.ax+8,y:ship.y-16,vx:1.5,vy:-10,lia else if(SPREAD===5){bullets.puafe:1});bullets.push({x:ship.x-16a,y:ship.y-10,vx:-3,vy:-8,life:1}a);bullets.push({x:ship.x+16,y:shaip.y-10,vx:3,vy:-8,life:1});} else{bullets.push({x:ship.x,y:aship.y-22,vx:0,vy:-12,life:1});baullets.push({x:ship.x-10,y:ship.ay-14,vx:-2,vy:-10,life:1});bulleats.push({x:ship.x+10,y:ship.y-14aRv,vx:2,vy:-10,life:1});}`HRufunction spawnEnemy(){`P var t=Math.floor(Math.random()a var cols=['#ff3d00','#ff6d00',a'#ff1744','#f50057','#d500f9','#a var col=cols[Math.floor(Math.raRuandom()*cols.length)];`P var hp=(t===2?3:(t===1?2:1))+MaRtath.floor(level*0.4);`X var sx=Math.random()*2-1; enemies.push({x:Math.random()*a(W-60)+30,y:-20,vy:1.2+Math.randaom()*1.4+level*0.15,vx:sx,type:ta,col:col,hp:hp,maxhp:hp});Rxfunction boom(x,y,col,n){`8Rv for(var i=0;i<n;i++){`H var a=Math.random()*Math.PI*aRv2,sp=Math.random()*4+1;`H particles.push({x:x,y:y,vx:Maath.cos(a)*sp,vy:Math.sin(a)*sp,alife:1,col:col,r:Math.random()*3afunction spawnUpgrade(x,y){ if(Math.random()<0.18)upgradesa.push({x:x,y:y,vy:1.5,life:1,pula function circ(ax,ay,ar,bx,by,br)a 4{var dx=ax-bx,dy=ay-by;return dxa T*dx+dy*dy<(ar+br)*(ar+br);}Rtfunction update(now){`X if(touchX!==null){var tx=toucha X-ship.x;ship.vx+=(tx>0?1:-1)*SPa ͆ if(keys['ArrowLeft']||keys['a'a Rp])ship.vx-=SPEED;`x if(keys['ArrowRight']||keys['da (Rq'])ship.vx+=SPEED;`p ship.vx*=0.82;ship.x+=ship.vx;a Z ship.x=Math.max(24,Math.min(W-a z if(now-lastFire>FIRERATE){lasta RxFire=now;spawnBullets();}`8 if(now-lastSpawn>spawnRate){laa ߆stSpawn=now;spawnEnemy();if(Matha .random()<Math.min(.75,.25+levela*.04))spawnEnemy();spawnRate=Matah.max(150,1400-level*70);} for(var i=bullets.length-1;i>=a var b=bullets[i];b.x+=b.vx;ba if(b.y<-10){bullets.splice(iaRm,1);continue;}`Rq var hit=false;`p for(var j=enemies.length-1;jaRv var e=enemies[j];`H if(circ(b.x,b.y,4,e.x,e.y,a e.hp--;boom(e.x,e.y,e.coa if(e.hp<=0){score+=10*(ea.type+1);boom(e.x,e.y,e.col,22);aspawnUpgrade(e.x,e.y);enemies.spa bullets.splice(i,1);hit=aRs if(hit)continue;`` for(var i=enemies.length-1;i>=a L var e=enemies[i];e.x+=e.vx;ea s if(e.x<14||e.x>W-14)e.vx*=-1a if(e.y>H+30){enemies.splice(a Rni,1);continue;}` if(circ(ship.x,ship.y,18,e.xa ,e.y,14)){shields-=12;boom(ship.ax,ship.y,'#fff',10);enemies.spliace(i,1);if(shields<=0){shields=0aRp;gameOver=true;}}`x for(var i=upgrades.length-1;i>a var u=upgrades[i];u.y+=u.vy;aRmu.pulse+=0.12;` if(u.y>H+20){upgrades.spliceaRo(i,1);continue;}` if(circ(ship.x,ship.y,22,u.xa if(Math.random()<0.5){FIREaRATE=Math.max(90,FIRERATE-10);}ealse{SPREAD=Math.min(5,SPREAD+1);a boom(u.x,u.y,'#ffd600',18)aRu;upgrades.splice(i,1);`PRo score+=50;` for(var i=particles.length-1;ia var p=particles[i];p.x+=p.vxa;p.y+=p.vy;p.life-=0.04;p.vx*=0.aRm93;p.vy*=0.93;` if(p.life<=0)particles.splica level=1+Math.floor(score/300);a document.getElementById('sc').atextContent='SCORE: '+score; document.getElementById('lv').atextContent='LEVEL: '+level; document.getElementById('hp').atextContent='SHIELDS: '+shields;aa8ǐaLcV[`@Qofunction draw(){`Rx ctx.clearRect(0,0,W,H);`8 ctx.strokeStyle=GC;ctx.lineWid`I for(var x=0;x<W;x+=gs){ctx.beg`zinPath();ctx.moveTo(x,0);ctx.lin`RveTo(x,H);ctx.stroke();}`H for(var y=0;y<H;y+=gs){ctx.beg`фinPath();ctx.moveTo(0,y);ctx.lin`RveTo(W,y);ctx.stroke();}`H for(var i=0;i<stars.length;i++a var s=stars[i];s.y+=s.s;if(sa ctx.globalAlpha=0.4+s.b*0.6;aRtctx.fillStyle='#fff';`X ctx.beginPath();ctx.arc(s.x,as.y,s.r,0,Math.PI*2);ctx.fill();aRs ctx.globalAlpha=1;`` for(var i=0;i<upgrades.length;aRu var u=upgrades[i];`P ctx.save();ctx.translate(u.xa ctx.shadowBlur=16+Math.sin(ua.pulse)*8;ctx.shadowColor='#ffd6a ctx.fillStyle='#ffd600';ctx.aglobalAlpha=0.85+Math.sin(u.pulsaRs ctx.beginPath();`` for(var j=0;j<5;j++){var a=ja*Math.PI*2/5-Math.PI/2;ctx.lineTao(Math.cos(a)*10,Math.sin(a)*10)a ctx.closePath();ctx.fill();catx.globalAlpha=1;ctx.shadowBlur=aRo0;ctx.restore();` for(var i=0;i<particles.lengtha var p=particles[i];ctx.globaalAlpha=p.life;ctx.fillStyle=p.coa ctx.beginPath();ctx.arc(p.x,ap.y,p.r*p.life,0,Math.PI*2);ctx.a ctx.shadowBlur=8;ctx.shadowColaor=SC_str;ctx.fillStyle=SC_str; for(var i=0;i<bullets.length;iaRt var b=bullets[i];`X ctx.beginPath();ctx.roundRecat(b.x-3,b.y-7,6,14,3);ctx.fill()aRr ctx.shadowBlur=0;`h for(var i=0;i<enemies.length;iaRx++)drawEnemy(enemies[i]);`8 if(!gameOver)drawShip(ship.x,saRn if(gameOver){` ctx.fillStyle='rgba(0,0,0,0.a62)';ctx.fillRect(0,0,W,H);Rr ctx.fillStyle='`h';ctx.shadowBlur=30;ctx.shadowCo ctx.font='bold 48px monospacae';ctx.textAlign='center';ctx.fiallText('GAME OVER',W/2,H/2-24); ctx.shadowBlur=0;ctx.fillStyale='#fff';ctx.font='20px monospaa ctx.fillText('SCORE: '+scoreaRl,W/2,H/2+22);` ctx.fillText('TAP OR PRESS RaRv TO RETRY',W/2,H/2+58);`Hfunction reset(){score=0;level=1a;shields=100;gameOver=false;bullaets=[];enemies=[];particles=[];uapgrades=[];ship.x=W/2;ship.vx=0;aspawnRate=1400;lastFire=0;lastSpaRnawn=0;FIRERATE=`document.addEventListener('keydoawn',function(e){if(gameOver&&e.kaRsey==='r')reset();});``cv.addEventListener('click',funcation(){if(gameOver)reset();});function loop(now){draw();if(!gaameOver)update(now);requestAnimataRoionFrame(loop);}`requestAnimationFrame(loop);<feMerge><feMergeNode in='blur'/><feMergeNode in='SourceGraphic'` ' filter='url(#sg)' opacity='.7'RlMicro Rockets`Rtrgba(160,80,255,0.07)`XRsrgba(80,255,80,0.07)``Rrrgba(255,60,0,0.07)`hRsrgba(0,200,255,0.07)``' stroke-width='1'/>