JS1K

#2: the original

Source for demo by antimatter15.

var b=document.body,c,d=innerWidth,e=innerHeight,j=3,k,l={},n=+new Date,o,p=Math.random;function q(a,f){a.substr&&(a=document.createElementNS("http://www.w3.org/2000/svg",a));for(var m in f)a.setAttribute(m,f[m]);return a}b.innerHTML="";b.bgColor="#0";b.appendChild(c=q("svg",{width:d,height:e}));c.appendChild(k=q("rect",{x:5,y:5,width:j*25,height:20,fill:"red"}));
function s(a,f){var m=p()-0.5,t=p()-0.5,g=d/2,h=e/2,i,r;c.appendChild(i=q("text",{x:g,y:h,fill:"#"+p().toString(16).substr(3,6)})).appendChild(document.createTextNode(f));(r=function(){q(k,{width:j*25});q(i,{x:g+=m,y:h+=t,"font-size":g-d/2+(h-e/2)});if(g>d||g<0||h>e||h<0){c.removeChild(i);j--;return l[f].splice(l[a].indexOf(i),1)}setTimeout(r,0)})();return i}
(o=function(){var a=91+~(p()*26);l[a]=(l[a]||[]).concat([s(a,String.fromCharCode(a))]);if(j<1)return s(0,"Game Over "+-~((new Date-n)/1E3));setTimeout(o,999)})();onkeydown=function(a){if(l[a.keyCode]&&l[a.keyCode].length){j++;c.removeChild(l[a.keyCode].pop())}else j--};