← Back to collection
Pong
Live · just now

Pong

#418 of 1,000
Collection
coindodo
Schema
games
Asset ID
1099522959449

Active listing

2.00 WAX

≈ < $0.01

Seller j5cqw.wam

Listed 1736d ago

Open on AtomicHub ↗

Ownership

Current owner
j5cqw.wam
Minted
Apr 9, 2021 · 22:46 UTC
Transferable
Yes
Burnable
Yes

Attributes

Immutable

img
QmcPVxkFQjS4Ha5rC23BDd42HXog7DvemgwHtpEfTTNgEbOpen
url
https://coindodo.io/nft
code
var x="x",y="y",d="d",e="e",wi="width",hi="height",f=document.createElement("canvas"),g=f.getContext("2d");f[wi]=768,f[hi]=432,f.id="game",document.body.appendChild(f),CanvasRenderingContext2D.prototype.clear=CanvasRenderingContext2D.prototype.clear||function(i){i&&(this.save(),this.setTransform(1,0,0,1,0,0)),this.beginPath(),this.clearRect(0,0,this.canvas[wi],this.canvas[hi]),this.closePath(),i&&this.restore()};var h={s:10},i={w:10,a:100,x:20,y:(f[hi]-100)/2,c:0,s:600},j={w:10,a:100,x:f[wi]-10-20,y:(f[hi]-100)/2,c:0,s:600},k={};addEventListener("keydown",function(i){k[i.keyCode]=!0},!1),addEventListener("keyup",function(i){delete k[i.keyCode]},!1);var l=function(){var i=Date.now();o((i-s)/1e3),m(),s=i,requestAnimationFrame(l)},m=function(){g.clear(),g.fillStyle="#DDD",g.fillRect(i[x],i[y],i.w,i.a),g.fillRect(j[x],j[y],j.w,j.a),g.font="22px monospace",g.textAlign="center",g.fillText(i.c,48,32),g.fillText(j.c,f[wi]-48,32),g.font="36px monospace",r?g.fillRect(h[x],h[y],h.s,h.s):g.fillText("PRESS SPACE TO START",f[wi]/2,f[hi]/2)},n=function(){r=!1,h[x]=(f[wi]-h.s)/2,h[y]=(f[hi]-h.s)/2,h[d]=.5<Math.random()?600:-600,h[e]=0},o=function(t){var a;32 in k&&(r=!0),87 in k&&(i[y]-=i.s*t,i[y]<=0&&(i[y]=0)),83 in k&&(i[y]+=i.s*t,a=f[hi]-i.a,i[y]>=a&&(i[y]=a)),80 in k&&(j[y]-=j.s*t,j[y]<=0&&(j[y]=0)),76 in k&&(j[y]+=j.s*t,a=f[hi]-j.a,j[y]>=a&&(j[y]=a)),h[x]<=0&&(j.c++,n()),h[x]>=f[wi]-h.s&&(i.c++,n()),h[x]<=i[x]+i.w&&i[x]<=h[x]+h.s&&h[y]<=i[y]+i.a&&i[y]<=h[y]+h.s&&(h[d]=Math.abs(h[d]),h[e]=p()),h[x]<=j[x]+j.w&&j[x]<=h[x]+h.s&&h[y]<=j[y]+j.a&&j[y]<=h[y]+h.s&&(h[d]=-1*Math.abs(h[d]),h[e]=p()),h[y]<=0&&(h[e]=Math.abs(h[e])),h[y]+h.s>=f[hi]&&(h[e]=-1*Math.abs(h[e])),r&&(h[x]+=h[d]*t,h[y]+=h[e]*t)};function p(){var i=600*Math.random();return.5<Math.random()?i:-1*i}var q=window;requestAnimationFrame=q.requestAnimationFrame||q.webkitRequestAnimationFrame||q.msRequestAnimationFrame||q.mozRequestAnimationFrame;var r=!1,s=Date.now();n(),l();
desc
Controls: P1=W/S, P2=P/L
name
Pong
codeType
js

Sale history

No sale history.

Transfer / activity log

DateActionFromToNotes
Apr 9, 2021 · 22:46 UTClogmintj5cqw.wamAuthorized by atomicdropsx