🏠 Games Tutorials Dev blog JS code golf Other projects

Mini Simon

July 2014 - August 2022

Introduction:

A Simon game with sound in 485 bytes of HTML/JS.

The game's graphics are made by a rounded HTML element with huge colored borders.

Reproduce the melody with the arrow keys. After each good answer, the melody becomes one note longer.

The sound is a bit loud, but there's a lower version in 516 bytes, and a tiny version with no sound and simpler graphics in 297 bytes.

Github:

https://github.com/xem/minisimon

Play:

http://xem.github.io/minisimon

Source code:

<body onload="a=(k,q)=>{z=['00F','FF0','F00','080'];~k&&new Audio((b='data:audio/wav;base64,UklGRl9vT19XQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YU')+Array(z[(3+k)%4]=333).join(b.slice(60+k*2))).play(s(a,250,-1));p.style.borderColor='#'+z.join('#');if(q)k^f[j]?alert(':('):++j^g||h()};(h=z=>{for(i=g=f.push(new Date%4);j=i;s(a,500*i--,f[i]))s=setTimeout})(f=[])"onkeyup=a(event.keyCode-37,1)><center><p style=background:#000;width:9em;height:9em;border-radius:50%;border:solid+9em id=p>

Demo (with lower sound):