SMB 1-1k

February 2019

A demake of the first level of Super Mario Bros, made in 1Kb for JS1k 2019.

Every sprite is reduced to a single colored pixel.

Play with arrow keys.

- Github

- Commented demo

- Commented source code

- making-of

<canvas id=a>
<script>
c = a.getContext(`2d`);
for(_='o=-.2NonkeyZ,1YY2XY0W=.V=1Uc.fillT][Hf[GGiHj]FTStyle=`#E==F?(ED]=C)GMHICG10H198C1B--Afor(@;iA;)@@I=i;I),a(2Y99Y,2,TRect(`9*])G,n~~,o=0=(l,iS(g(d&&1)j=999;jA;),9`0,09999-9*e	,8;@i oG)=>{@MU1;MA>l;)HiCa(6Y(GiHl]j	*i)f=[l=u=r=e=o=t=0],d=n=2,y=R=24,SGMGMHi+1C4},a,eif(e)<i+M-l;I++B;else A>i-M+l;B},g,e)=>{if(Gi])return e2!=A};@iU5GiC[],GiHjCi>10![69,70678Y53Y54].includes(j)224W23033801234567123X1X2X3X8Y3131813,78W6W12Y70732024,77,794W0Y18X308717G10H198C1;S(988,387,467,5793793852530140Y55,,Zdown=Zup=(l=>selG`lur`[l.which-37]Cl.type[5]setInterval("@R-V02,Math.hypot(R-dW-n)<1z?(R=-1,N):t=,ld>e-V1)dU+drg((d+V+1)?d=d-.1:d>e+7e+Vu!zN5)+=o+V012,o<0+=o,|+.9,nU+n(n>14||d>198)t=,z=u=!(+|+.5+z||(n=nE59fiU34D8d11784	):3Df93):FEc40);Ea00R	0Ed20d	*nttop.reload(yE000yA)")';G=/[-@-HT-ZN]/.exec(_);)with(_.split(G))_=join(shift());eval(_)
</script>