4 ms·
Show HN: Interactive guide to Tetris in ClojureScript
- tgriesser 12y agoResources like this are exactly what I've been searching for while learning clojure(script). Really great work.
- robertfw 12y agoReally nice interactive demo! Great work!
- arms 12y agoWow - 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 :)
- ibdknox 12y agoThis 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.
- undershirt 12y agoThanks, Chris. I hope github attains longevity for reasons like this.
- kcorbitt 12y agoJust 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.
- NoodleIncident 12y agoSame on my 15" whatever. Zooming out makes everything fine, allowing scrolling would, too.
- roryokane 12y agoSame 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).
- arsenerei 12y agoFantastic work. As 'ibdknox said, a wonderful display of open source and ingenuity. Here the links to Shaun's work. slides: https://github.com/shaunlebron/t3tr0s-slides https://github.com/shaunlebron/t3tr0s-slides game: https://github.com/imalooney/t3tr0s https://github.com/imalooney/t3tr0s
- angersock 12y agoShaun is a really cool guy, very friendly and helpful. :)
- adrianm 12y agoColor 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.
- mrcwinn 12y agoEven 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. Anyway, great work!
- tl 12y agoCool 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?
- undershirt 12y agoThanks 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.
- undershirt 12y agoI used advanced optimizations, and the problem went away.