Show HN: A Tetris clone written in ES6 using React
tetris.joshbassett.info
tetris.joshbassett.info
simon.lc/tetr.js is currently my favorite web based version and i think a good standsrd
https://www.reddit.com/r/Tetris/comments/13uqby/whats_das_an...
“[…] but in general, ARR is auto repeat rate (how quickly the pieces move from right to left.) And DAS is delayed auto shift (How long you have to hold down the button to before a piece starts flying to the wall). Changing them can change how "slippery" your pieces feel and can also enable you to play a lot faster. […]”
This works fine at lower rates but once you hit anything greater than 120 or so there's a noticeable lag between hitting the key to rotate and the shape actually rotating - enough that the shape will often have moved a couple of spaces by the time it rotates which makes it very difficult to play.
Not sure if that's inherent to the framework or just how this particular version is programmed.
It's nice that react is just a view library, so you are free to choose the rest of your stack to best suit your app (i.e. a game).
The only thing I would point out is that you should use immutable data structures, so that you don't re-render parts of your view unnecessarily. There are ways to handle this without immutable data structures (i.e. componentShouldUpdate), but it's more of a pain IMHO.