I made the WORLD'S SMALLEST TETRIS...

Поділитися
Вставка
  • Опубліковано 19 гру 2024

КОМЕНТАРІ • 82

  • @evanzhoudev
    @evanzhoudev  Рік тому +149

    Here's what tiny Tetris looks like in normal text size... UA-cam's font isn't particularly friendly to it 😅
    ⠀⠀⠀⠀⠀
    ⠀⠀⠀⠀⢰
    ⠀⠀⠀⠀⠈
    ⠀⠀⠀⠀⠀
    ⣠⣠⣴⣦⠀

    • @ZephyrysBaum
      @ZephyrysBaum Рік тому +7

      why did this video tank in the algorithm? tbh I didn't click this immediately, but I wasn't disappointed when I did!

    • @Ðogecoin
      @Ðogecoin Рік тому

      Hi friend

  • @verlidesouza
    @verlidesouza Рік тому +139

    Fun fact, due to most screens having subpixels on a grid pattern, you can make a Tetris game in 3.33x20 pixels!

    • @W3Rn1ckz
      @W3Rn1ckz Рік тому +5

      I suspect that would be visually incomprehensible on mostmodern displays

    • @woekin
      @woekin Рік тому +1

      Not good for oled subpixels or other rgb+ (yellow, white)

    • @endiogoen
      @endiogoen Рік тому +4

      this is what I thought was gonna happen when I opened the video

    • @sophiacristina
      @sophiacristina Рік тому +1

      @@W3Rn1ckz skill issue...

    • @dootss
      @dootss 11 місяців тому +1

      hahaha, so the smallest tetris would be using a low-level language, or even the physical hardware to manipulate each pixel or rgb field

  • @Temulgeh
    @Temulgeh Рік тому +102

    average JS dev trying to find a library to do something that literally fits on one screen of code ☠

    • @buysnoah
      @buysnoah Рік тому +1

      wait till you hear about the python users

    • @Temulgeh
      @Temulgeh Рік тому

      @@buysnoah don't they just use the same 3 libraries to train neural networks, and to do big calculations because python is slow tho

    • @buysnoah
      @buysnoah Рік тому +1

      @@Temulgeh well python users are a bit different to your comment, they make 0% of their own code and just import libraries to do everything for them

  • @ZephyrysBaum
    @ZephyrysBaum Рік тому +41

    This gives me motivation to start my own project.

  • @iamdigory
    @iamdigory Рік тому +15

    "You may want to know why I'm doing something stupid like this again" I immediately liked and subscribed

  • @TVDaJa
    @TVDaJa Рік тому +8

    This would be great as a terminal application

    • @codexed-i
      @codexed-i Рік тому

      Just use Braille characters
      EDIT: he alr used them

  • @MinEntropy
    @MinEntropy Рік тому +43

    Cool project. Quick correction, though, the block character is not ASCII.

    • @evanzhoudev
      @evanzhoudev  Рік тому +11

      Not in the original ascii, yes :)

    • @Aeduo
      @Aeduo Рік тому +7

      @@evanzhoudev The one we're most familiar from PC text mode would be IBM codepage 437 or something of the like. Not ASCII but all kinda thrown under the same umbrella at the time. Of course, opening such a document in Notepad or something would've been interpreted as Windows-1252 or some other odd 8 bit encoding. Thankfully we have Unicode now. :p Not perfect but better than what we had.

    • @0LoneTech
      @0LoneTech 11 місяців тому +1

      Not in ASCII, period. It's a rather specific 7-bit standard (ANSI X3.4-1986, AFAIK it hasn't changed substantially since 1977). Also note that the "first version ever" screenshot here contains cyrillic letters, another feature absent from ASCII.
      You may also be amused by looking up sixels. With 15 by 12 user definable characters, you could run in two custom characters on a VT320.

  • @Karma_komodo
    @Karma_komodo Рік тому +57

    There no such thing as an useless proyect: art is an use

  • @triplebog
    @triplebog Рік тому +4

    The fact you looked for a library to render braille in this manner is indicative of the brain rot that is JavaScript development holy moly
    Great video though

    • @evanzhoudev
      @evanzhoudev  Рік тому

      It’s rather hard to find how braille Unicode works 😅

    • @SaHaRaSquad
      @SaHaRaSquad Рік тому +2

      To be fair it's not exactly intuitive to use braille for pixels if you want it to be efficient. Has nothing to do with JS, lower level languages have libraries for this as well, and for terminal coloring/styling because terminals are a clusterfuck of partially supported, inconsistent ancient standards layered on top of each other and some people just don't enjoy digging through badly explained ansi escape codes.

  • @SaHaRaSquad
    @SaHaRaSquad Рік тому +3

    It would be cool if terminals supported printing symbols over each other without deleting the previous ones. That alone would be enough to draw pixel graphics and all that in the terminal. I wonder if there's a terminal application which can do this, after all that's how the original paper-based TTYs behaved as far as I know. The Braille method is neat but doesn't allow multiple colors...

  • @justintyler4814
    @justintyler4814 Рік тому

    "after realizing every font for this task looks like squares I settled for the only one that displayed brail"😂

    • @evanzhoudev
      @evanzhoudev  Рік тому

      Ig google fonts isn’t particularly good for braille

    • @justintyler4814
      @justintyler4814 Рік тому

      The way you solved the problem is so much cooler

  • @jyggalag_
    @jyggalag_ Рік тому

    Oh wow. I was going to do it in block chars but the braille are awesome!

  • @hoteny
    @hoteny Рік тому +2

    2:35 extremely glad you actually put a trypophobia warning. You are the first person I have ever seen do that.

  • @daxtron2
    @daxtron2 Рік тому

    Only 500 views?! This is great work

  • @erinlee07
    @erinlee07 Рік тому

    finally another tetris game i can play unblocked on my school Chromebook

  • @matt92hun
    @matt92hun Рік тому +3

    Would it be possible to use something like sub-pixel rendering to fit multiple bricks on the same pixel? Like the end of one and the beginning of the one next to it are the same pixel.

    • @fjyetto
      @fjyetto Рік тому +2

      i was thinking of that, yes it would be possible its just a matter of making it
      assuming pixels on a screen are laid out in a rectangle R-G-B fashion, you can probably have the main board fit on 4x20 pixels

  • @NatanM
    @NatanM Рік тому +2

    Even braille is backwards compatible, what a shame for Python3

  • @isheamongus811
    @isheamongus811 Рік тому

    There were corner ANSI blocks aka AltGr blocks afaik.

  • @AEw5JdbLyvEF
    @AEw5JdbLyvEF Рік тому +20

    no we just need someone to do this in C to make the worlds smallest smallest tetris
    btw you should really add mobile controls to your site

    • @Aeduo
      @Aeduo Рік тому +2

      The original was probably already in assembly. :p

    • @electra_
      @electra_ Рік тому

      i remember a while back making a very small version of tetris in C, was kinda fun

    • @evanzhoudev
      @evanzhoudev  Рік тому

      It’s just a proof of concept, not meant to be playable… if I get sufficient request I might make a polished website tho I doubt it will happen ;)
      And yes, code size is pretty big, pretty sure others have alr made a smaller version

  • @capdyn735
    @capdyn735 Рік тому

    This was a cool video!

  • @anon_y_mousse
    @anon_y_mousse 11 місяців тому

    I've never written a Tetris clone, maybe I should try it, but with ncurses. I'm thinking that I'll make the pieces twice as wide in a horizontal direction. That won't be confusing.

  • @DanatronOne
    @DanatronOne Рік тому

    You should call it Tetrs, because it's 5 characters wide and uses braille (perfect for if you have no `I`s)

  • @Metruzanca
    @Metruzanca 4 місяці тому

    This is awesome

  • @jakeaustria5445
    @jakeaustria5445 Рік тому +1

    Why not make it just one pixel for each block

  • @locker47
    @locker47 Рік тому

    Awesome! Blind people can now play Tetris! :P

  • @ali.005
    @ali.005 Рік тому +2

    EVAN ZHOU BACK WITH ANOTHER BANGER?????

  • @12...
    @12... Рік тому

    you might want to try the "block sextant" characters, though those are newer and not as widely supported

    • @evanzhoudev
      @evanzhoudev  Рік тому

      That’s less compact than braille; only 6 subunits rather than 8

    • @Wilker_uwu
      @Wilker_uwu Рік тому

      @@evanzhoudev but have you tried kanji characters?

    • @evanzhoudev
      @evanzhoudev  Рік тому

      @@Wilker_uwu Are there any you are thinking of in particular?

    • @SaHaRaSquad
      @SaHaRaSquad Рік тому

      @@Wilker_uwu kanji aren't point grids, also many kanji cover the space of two monospaced characters as they're too complex to be correctly displayed otherwise.

    • @Wilker_uwu
      @Wilker_uwu Рік тому

      @@evanzhoudev i was thinking of the most broken down ones, or words such as "mountain" (山), "cliff" (⺁), "up/climb/raise" (上), "eye" (目), or maybe some katakana thrown in since there's also some right-angles to find there too with the smaller char set

  • @ski3r3n
    @ski3r3n 3 місяці тому

    no 7-bag system literally unplayable

  • @dsagman
    @dsagman Рік тому

    and when are you making the tetris font?

    • @evanzhoudev
      @evanzhoudev  4 місяці тому

      omg i can't believe missed this comment... just saw this, and it would be such a fun video idea :)

  • @litfill54
    @litfill54 Рік тому

    3:55 lol

  • @gaimnbro9337
    @gaimnbro9337 Рік тому

    this should be done in irl with the braille and blind people can just play tetris with these braille things popping in and out, to say the least it'd be unconventional but it's awesome to think about

  • @chr0matic556
    @chr0matic556 Рік тому

    i love this!

  • @fovspace-rk5xb
    @fovspace-rk5xb Рік тому

    Love it!

  • @FZs1
    @FZs1 Рік тому +1

    Why does Unicode even have Braille? You'd think it's for the blind, but it's not like you could touch the screen and feel the dots...?

    • @elmomertens
      @elmomertens Рік тому +5

      It's useful for people with sight who want to learn braille or anyone who wants to talk about braille, and also maybe some digital braille displays might make a use of it? Unicode's modus operandi is to codify "all" of the writing system so that might have something to do with it as well.

    • @elmomertens
      @elmomertens Рік тому +2

      how a digital braille display /*might/* make a use of it (although i don't know about it):
      obviously english braille can be just codified as english alphabet in the system, but not all languages could be just as easily hard-coded in to the system. By making the braille part of unicode somewhat language-independent, displays don't have to worry about converting data back and forth - that becomes OS's job which would be much easier to implement and update.

    • @justaway_of_the_samurai
      @justaway_of_the_samurai Рік тому +5

      Unicode only specifies the numeric values that translates to characters, both visible and invisible, regardless of how or whether the will be displayed to the user.
      In the case of the Braille characters, the values could be outputted to electronic braille readers which create physical bumps for the blind to read, or they can be sent to a braille printer to print the letters out on braille paper for later reading.
      Font developers cant choose whether or not to provide visual symbols to represent the values in digital mediums.

  • @RedStone576
    @RedStone576 Рік тому

    nice

  • @__hannibaal__
    @__hannibaal__ Рік тому

    In c/c++ ; better let do it/ .
    Thanks

  • @ski3r3n
    @ski3r3n 3 місяці тому

    four wide game

  • @j.21
    @j.21 Рік тому +2

    a

  • @GTGTRIK
    @GTGTRIK Рік тому

    Really, the longest bit of the video is rendering dots into braille? Assembling bits from a few offsets? That?

  • @MaxwellCatAlphonk
    @MaxwellCatAlphonk Рік тому +1

    Тетрыс

  • @b3at1
    @b3at1 Рік тому

    this is cool but I was expecting him to use electrons to make tetris :( seems very misleading to call it the worlds smallest when you've just went and rendered characters on a screen
    edit: maybe not electrons but something microscopic at least

  • @bobbyraduloff
    @bobbyraduloff Рік тому

    Why did I see JSON.parse(JSON.stringify(x)) in the code b roll??????

    • @evanzhoudev
      @evanzhoudev  Рік тому +1

      Was for setState to prevent direct state mutations… yes ik there’s a native way to deep copy objects now, no I didn’t break my old habits :)