6 ms·
Tetris Font (2020)
- PetitPrince 2y agoRelated: One of the subniche in the Tetris communities is Tetris art / pattern creation, i.e. drawing predefined patterns while playing the game (almost) normally. One of most practiced pattern is the chevron, where you draw a > shape with holes, but otherwise fill the whose board. This stemmed from the Japanese arcade version of Tetris by Sega (or Segatet for those in the known). This version was hugely popular in the arcade (it stayed for an incredibly 10 years in the top100 earner in some arcade magazine), and some player were destroying the game so much that they invented this challenge. This was recognized in Segatet successor Tetris the Grand Master (TGM3), and formally named "Secret Grade". One example here: https://www.youtube.com/watch?v=ZgzcAkjp0J8 https://www.youtube.com/watch?v=ZgzcAkjp0J8 , and another there with TGM3 signature speed https://www.youtube.com/watch?v=32wzKc0cHQU https://www.youtube.com/watch?v=32wzKc0cHQU . But in general, Shuey is the master of arbitrary making pattern. Look at him drawing a Luigi: https://www.youtube.com/watch?v=_tipJDjeKuY https://www.youtube.com/watch?v=_tipJDjeKuY . Note that since then, an algorithm for arbitrary pattern generation has been devised by Michael Birken: https://www.youtube.com/watch?v=PJkHwulsac4 https://www.youtube.com/watch?v=PJkHwulsac4 (sort of related: the playing forever algorithm may be interpreted as a pattern creation https://tetris.wiki/Playing_forever https://tetris.wiki/Playing_forever )
- mandibeet 2y agoIt's so satisfying to watch...
- lupire 2y agoDo these pattern drawings only work with aluck Manipulation?
- PetitPrince 2y agoSecret grade is done within the confines of the game with no luck manipulation. Note that the piece distribution algorithm is usually not a pure random() function, but one that's optimized to remove or reduce piece repetitions. For TGM it's history based (keep in memory the 4 last pieces type, reroll in case of repetition, with a 4 or 6 reroll limit depending on the game). IIRC Shuey uses a ruleset that uses the standard 7-bag algorithm (it's a Fisher-Yates with 7 elements; put all 7 types in a collection and deplete them one by one, randomly).
- joshmarinacci 2y agoI love little webtools like this that save state in the URL for easy sharing.
- Bluestein 2y agoIndeed.- (The URL as a tool. Such a great "innovation" too. URLs are wonderful ...)
- nofinator 2y agoVery neat! I love how you can do an entire paragraph. For example https://erikdemaine.org/fonts/tetris/?text=%7D6G6C+8%40%3F%3F2+8%3AG6+J%40F+FA%0A%7D6G6C+8%40%3F%3F2+%3D6E+J%40F+5%40H%3F%0A%7D6G6C+8%40%3F%3F2+CF%3F+2C%40F%3F5+2%3F5+56D6CE+J%40F%0A%7D6G6C+8%40%3F%3F2+%3E2%3C6+J%40F+4CJ%0A%7D6G6C+8%40%3F%3F2+D2J+8%40%4053J6%0A%7D6G6C+8%40%3F%3F2+E6%3D%3D+2+%3D%3A6+2%3F5+9FCE+J%40F&rot=1&speed=10 https://erikdemaine.org/fonts/tetris/?text=%7D6G6C+8%40%3F%3...
- Bluestein 2y agoIndeed.- (And, incidentally, how the URL encodes the value used for text generation, so that you can share links to actual examples ...) Pretty neat.- PS. Nice Rickroll, BTW :)
- froh 2y agovery neat text you've chosen there, too! thank you :-)
- mandibeet 2y agoNow I sing tha song for about 15 min already
- corytheboyd 2y agoI think there’s a small bug where the speed change isn’t reflected in the downloaded gif (it’s very slow by default)
- edemaine 2y agoI couldn't reproduce this bug. Perhaps the program you're using to display the GIF doesn't support the GIF frame delay feature? (E.g., Chrome seems to display them fine.) Feel free to open an issue on the repo if I'm missing something: https://github.com/edemaine/font-tetris https://github.com/edemaine/font-tetris
- corytheboyd 2y agoAh, fwiw was using my iPhone for the test, so perhaps it’s just scoped to that. Not like that’s a use case you really need to support with this :)
- throwitaway222 2y agoPerfect, maybe we can make HN use this font for a day exclusively.
- thih9 2y agoI don't understand the limitation to use all of the pieces exactly once, I'd say the rule to keep valid Tetris moves only is enough. I'm curious what could be built with just that in place. Right now I especially dislike letters: 'B', 'G', 'I', 'N'. For comparison, I like 'F' and '1', they both look very natural to me; 'A' and 'S' get a pass too. 'Q' gets a special mention for its long tail. That being said, the project is super cool and looks great already.
- acidx 2y agoReminds me of this sample from the Lwan project: https://time.lwan.ws/blocks https://time.lwan.ws/blocks -- where the clock is rendered on the server, and new frames are sent to the client using chunked encoding.
- tamimio 2y agoCool, I wish there was a variations for the pieces for each letter though.
- ericfrederich 2y agoWould be nice if the "obscure in URL" feature wouldn't show the text in the textbox when you send it to someone.
- Bluestein 2y agoWell noticed. Good point ... (Or an additional "Obscure in textbox" checkbox or something along those lines ...)
- edemaine 2y agoGood idea! I've gone ahead and implemented this feature: if "obscure in URL" is turned on, the text won't be visible unless you focus on the textbox (e.g. to edit it).
- omoikane 2y agoReminds me of this paint-by-tetris tool: https://www.ioccc.org/years.html#2013_birken https://www.ioccc.org/years.html#2013_birken
- _joel 2y agoNice https://erikdemaine.org/fonts/tetris/?text=u%26rz+~uu&rot=1&hud=0 https://erikdemaine.org/fonts/tetris/?text=u%26rz+~uu&rot=1&...
- jacobgorm 2y agoMy Amiga could do that too! https://www.youtube.com/watch?v=-r9LlyJ9YN4 https://www.youtube.com/watch?v=-r9LlyJ9YN4
- Bluestein 2y agoTETRIS: THE MUSICAL (!) - https://www.youtube.com/watch?v=TwcS46tkixI https://www.youtube.com/watch?v=TwcS46tkixI
- legohead 2y agoFeels like there should be many ways to make a particular letter, and it'd be neat if it was random each time. I tried "Hello" and noticed the L's are the same. Considering it's just for fun I think it'd add a little more fun if it was actually unique letters. Also, can we get a checkbox for "pause after animation"? I want to take a minute to check out the letters before it starts animating again. I know you can click off Animate after it finishes, but if I share this, others may not be so keen.
- edemaine 2y agoRegarding the first question, I've gone ahead and implemented random build orders, so at least the two Ls in HELLO will usually produce different animations (depending on random choices). Designing completely different glyphs for the same letter is quite challenging (finding these already took a lot of work). Regarding the second question, there's already a 2-second delay. I wonder if there should be a slider to specify the delay?
- nothingneko 2y agoi was interested to see how it would render kanji, probably is harder than i think
- yakorevivan 2y ago[dead]
- gnanasekaran08 2y agoNice..
- ambyra 2y agoMultiplayer Tetris that spins!! https://youtu.be/PGFgcaVmL_I?si=egqUDmOc8D2cUAUM https://youtu.be/PGFgcaVmL_I?si=egqUDmOc8D2cUAUM
- nemoniac 2y agoASCII only?
- TheRealNGenius 2y ago[dead]
- LarsDu88 2y agoAh I learned dynammic programming from watching this guy's lectures. Child prodigy who went on to become an MIT professor!
- saltyoutburst 2y agoGreat doco about origami that Erik appears in. 'Between The Folds' https://www.youtube.com/watch?v=DiIr7du6Y3w https://www.youtube.com/watch?v=DiIr7du6Y3w
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- Bluestein 2y agoComing soon near you: - Game of life using Tetris - Logic gates using Tetris - Full microprocessor using Tetris - Full computer emulation using Tetris ... :)
- Bluestein 2y agoThe author explains: "Each letter and digit in this typeface is made up of exactly one of each of the Tetris pieces: (I), (J), (L), (O), (S), (T), and (Z). Furthermore, the letter is designed so that it can actually be constructed by stacking these pieces one at a time and be supported by previous pieces, as in Tetris. These designs were found by hand, aided by the BurrTools software which enabled searching for whether the Tetris pieces could fit inside a candidate outline for a letter. The piece colors roughly follow The Tetris Company's standard colors, or you can switch to black pieces. The initial rotations follow the standard Super Rotation System."
- fransjorden 2y agoThis is really cool! As a big Tetris and typography fan this is such a novel combination, especially as they're all buildable in-game.
- Bluestein 2y agoQuite the "rabbit hole", trying different texts, punctuation (sadly, none that I could produce, which - if you think about it, makes sense) ...
- mdrzn 2y agoVery cool!
- makach 2y agoWow! But can you vary how you build each type - all letters seem to follow the same recipe
- jtxt 2y agoThis is neat, but yeah, another fun challenge: have it build a letter/word/pixel art from random pieces, the best it can.
- edemaine 2y agoThanks for the feature suggestion! I've gone ahead and implemented random valid stacking order. So if you reload the page, and enter text that repeats the same letter more than once, you will hopefully get different build orders (depending on random choices). For example: https://erikdemaine.org/fonts/tetris/?text=aaaaa&rotate=0&speed=4 https://erikdemaine.org/fonts/tetris/?text=aaaaa&rotate=0&sp...
- Bluestein 2y agoMaking a great thing even greater :) Congrats on such a neat idea so nicely executed ...
- Bluestein 2y agoYes. I think the "recipes" are hardcoded.-
- andrei-akopian 2y agoFrom a programming perspective, it would have been cooler if the font generation was automatic at the cost of a bit of quality. This might have allowed for more interesting variation, lowercase, and support of other symbols. There is nothing less anoying than seeing a really custom font repeat a letter.
- TacticalCoder 2y agoFor those who don't know the author: https://en.wikipedia.org/wiki/Erik_Demaine https://en.wikipedia.org/wiki/Erik_Demaine
- breck 2y agoOh wow, quite a portfolio: https://github.com/edemaine https://github.com/edemaine He is also the maintainer of KaTeX, which I depend on. (Thanks Erik!)
- moritzwarhier 2y agoI know him from proving NP-hardness of the game Sokoban: https://erikdemaine.org/papers/PushingBlocks_CGTA/ https://erikdemaine.org/papers/PushingBlocks_CGTA/ And I clicked this submission because of his name, after all the time. I didn't fully go through or understand the proof, but it was a refreshing addition to the classic problems I had to understand for college at the time. Didn't need it, just fed my curiosity. And when I clicked this link, my curiosity was fed again. Seems like it's worth having heard of him, even as a non-scientist, because his subjects are just so interesting. Reminds me of Scott Aaronson in that regard.
- areyousure 2y agoThat paper does not prove that Sokoban is NP-hard. It does, however, cite an earlier paper proving the stronger result that Sokoban is PSPACE-complete: Culberson, Joseph. "Sokoban is PSPACE-complete." (1997). https://era.library.ualberta.ca/items/f551dfd8-c8e6-4e78-883d-3afbee5bce83 https://era.library.ualberta.ca/items/f551dfd8-c8e6-4e78-883... See also https://erikdemaine.org/papers/NCL_TCS/ https://erikdemaine.org/papers/NCL_TCS/
- moritzwarhier 2y agoYes, correct, and mentioned in the abstract. Sorry, I was imprecise and wrong. Thanks for the links!
- pcloadletter_ 2y ago
- muth02446 2y agoI worked on a similar project here: https://github.com/robertmuth/TetrisScroller https://github.com/robertmuth/TetrisScroller It has a pretty much complete ascii font but I am cheating in that I allow one non tetris piece with only 3 pixels arranged as an angle. There is also a simple tool that tries to find a covering of a given font.
- csmeyer 2y agoThis is cool, and some of Demaine’s other work is amazing too. https://erikdemaine.org/papers/Origamizer_SoCG2017/paper.pdf https://erikdemaine.org/papers/Origamizer_SoCG2017/paper.pdf ^ provides an algorithm for generating any 3D solid via folding a 2D net (origami style)
- refset 2y agoThe Advanced Data Structures course lectures are great, including his very own research on "Retroactive Data Structures" https://courses.csail.mit.edu/6.851/spring21/lectures/L01.html?notes=1 https://courses.csail.mit.edu/6.851/spring21/lectures/L01.ht...
- Bluestein 2y agoAll the "time travelling" they do with these data structures is really cool.-
- tobyhinloopen 2y agoWho would want to use the browser’s back button to undo a state change… I had to press back 20 times
- corytheboyd 2y agoAgreed, was very annoying, please don’t misuse history like that :(
- edemaine 2y agoI find the back/forward buttons useful for undoing/redoing changes, so that I don't lose past cool designs / settings, though I can see it being a controversial approach. That said, there were definitely way too much history generated when typing into a text field. I just implemented a planned compromise, where you only get a history event when changing a "committed" text field (meaning you previously defocused the field). Hopefully this is the best of both worlds!
- xd1936 2y agoRight-click the back button?
- tobyhinloopen 2y agoWhere’s the right click button on my phone
- wayvey 2y agoLong press
- TehCorwiz 2y agoBrowsers only display the last 10 - 20 states, so if you've been clicking around it quickly fills up with just this page.
- laszlokorte 2y agoWould be nice if browsers would group back button entries by: 1. same url except hash 2. same domain 3. rest
- erk__ 2y agoI did kinda the opposite and instead of making a font out of tetris I made a font play Tetris. I did it with the Harfbuzz shaper which now have experimental support for embedding WebAssembly programs to shape fonts. Talk where I show it off: https://www.youtube.com/watch?v=Ms1Drb9Vw9M https://www.youtube.com/watch?v=Ms1Drb9Vw9M Source code: https://github.com/Erk-/programmable-fonts https://github.com/Erk-/programmable-fonts You can also see actual uses of this WebAssembly embedding to show that is not just for fun here: https://github.com/harfbuzz/harfbuzz-wasm-examples https://github.com/harfbuzz/harfbuzz-wasm-examples
- RugnirViking 2y agothats absolutely bananas, awesome job. The bad apple showcase is great too.
- hteza 2y agoIf anyone else is looking for the links repo: https://github.com/hsfzxjy/Bad-Apple-Font https://github.com/hsfzxjy/Bad-Apple-Font youtube[1]: https://www.youtube.com/watch?v=GF2sn2DXjlA https://www.youtube.com/watch?v=GF2sn2DXjlA youtube[2]: https://www.youtube.com/watch?v=qFd8vsr8nag https://www.youtube.com/watch?v=qFd8vsr8nag
- erk__ 2y agoThat was the first part I did, I wrote a blog about it here [0]. At the time it was also discussed on here at [1]. [0]: https://blog.erk.dev/posts/anifont/ https://blog.erk.dev/posts/anifont/ [1]: https://news.ycombinator.com/item?id=37317055 https://news.ycombinator.com/item?id=37317055
- quotemstr 2y agoNice demo. Really kicks all the "bytecode can never be fast --- we have to AOT everything" people in the teeth, doesn't it?
- sureglymop 2y agoCoolest thing I've seen so far this year. Demo starts at 22:55 but the whole presentation is worth watching.
- bpiroman 2y agoExcellent!!
- poopcat 2y agoI have to admit I did not know where it was going at first but was thoroughly delighted once it finished stacking up haha
- ChaseAdonut44 2y ago[flagged]
- zeitlupe 2y agoIt reminds me of long-gone times where the web was about sharing easy fun like this instead of viral marketing and influencers.
- Bluestein 2y ago(It indeed does :) Same here)