This is a great example of the magic of open source. He took a project I haven't touched in almost 3 years and made something wonderful out of it. That may very well have never happened 10 years ago.
Awesome work Shaun, thanks for contributing back to the ecosystem.
Even aside from the specifics of ClojureScript, this is just a wonderful example of separating and planning for the requirements of an application.
How is a piece defined and drawn?
What control does the user have over a piece?
Since two pieces cannot intersect, how can I detect that?
And so on...
Not unique to ClojureScript, it's a great reminder the best way to write great code is to ask these questions and answer them before you begin composition.
Just an FYI in case the creator is here: on my 13" Macbook Pro the bottom of the slides are cut off at the default zoom level. I had to decrease the size to 75% to see the whole thing.
Same for me on my 1080p external display on a Mac.
To clarify, the part that is cut off is the code inside the black rectangle, not the black rectangle itself. The problem is only on slides where the output is the 20-row board matrix. Since I can’t scroll the code, I could only fix it by zooming out (text-only zoom).
Wow - perfect timing. My copy of Clojure Programming should be delivered tomorrow, and this looks like a nice way to complement my learning. Plus, I love Tetris :)
Cool presentation, but I have a question: go to slide #1, mouse over the top row, move your mouse along the element to the bottom row. There is noticeable lag in Chrome 37 as the page tries to re-draw the rows highlighted.
Other slides seem to have reasonable performance; is there something in ClojureScript that we should avoid here?
Thanks for bringing this up, I noticed that too. I think I might be handling React.js keys incorrectly, causing the DOM-diffing to perform poorly for number-highlighting. Haven't really looked into it too deeply.
Color me impressed with this. Kudos to the author! It's a fantastic example of not only how to progress through concept to implementation with a game, but how interactive development can make this process all the more enjoyable for the developer, with a much faster feedback loop than more traditional (statically compiled) game design allows.
Awesome work Shaun, thanks for contributing back to the ecosystem.