Re:Show HN: Simple JavaScript Tetris
by jstimpfle on Wednesday November 02, 2016 @03:05PM
(#12858206)
The reason why I'm (sort of) proud of this is exactly that I managed to not get hung up with such considerations and just do the obvious things. It's not a problem to scan through 200 blocks (of which often 50% will be habitated) once every 100ms or so).
If there is any need for optimization, then it would probably be to avoid DOM inefficiencies and opting for canvas or another environment.
Either way, cool game! Pretty neat you could do that in sub 400 lines of code.