I made the WORLD'S SMALLEST TETRIS...

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

КОМЕНТАРІ • 82

  • @evanzhoudev
    @evanzhoudev  9 місяців тому +149

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

    • @ZephyrysBaum
      @ZephyrysBaum 9 місяців тому +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 9 місяців тому

      Hi friend

  • @verlidesouza
    @verlidesouza 9 місяців тому +137

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

    • @W3Rn1ckz
      @W3Rn1ckz 9 місяців тому +5

      I suspect that would be visually incomprehensible on mostmodern displays

    • @woekin
      @woekin 9 місяців тому +1

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

    • @endiogoen
      @endiogoen 9 місяців тому +4

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

    • @sophiacristina
      @sophiacristina 8 місяців тому +1

      @@W3Rn1ckz skill issue...

    • @dootss
      @dootss 8 місяців тому +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 9 місяців тому +102

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

    • @buysnoah
      @buysnoah 8 місяців тому +1

      wait till you hear about the python users

    • @Temulgeh
      @Temulgeh 8 місяців тому

      @@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 8 місяців тому +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 9 місяців тому +41

    This gives me motivation to start my own project.

  • @MinEntropy
    @MinEntropy 9 місяців тому +42

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

    • @evanzhoudev
      @evanzhoudev  9 місяців тому +11

      Not in the original ascii, yes :)

    • @Aeduo
      @Aeduo 9 місяців тому +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 8 місяців тому +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.

  • @iamdigory
    @iamdigory 9 місяців тому +15

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

  • @TVDaJa
    @TVDaJa 9 місяців тому +8

    This would be great as a terminal application

    • @codexed-i
      @codexed-i 9 місяців тому

      Just use Braille characters
      EDIT: he alr used them

  • @triplebog
    @triplebog 9 місяців тому +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  9 місяців тому

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

    • @SaHaRaSquad
      @SaHaRaSquad 9 місяців тому +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.

  • @Karma_komodo
    @Karma_komodo 9 місяців тому +57

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

  • @SaHaRaSquad
    @SaHaRaSquad 9 місяців тому +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 8 місяців тому

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

    • @evanzhoudev
      @evanzhoudev  8 місяців тому

      Ig google fonts isn’t particularly good for braille

    • @justintyler4814
      @justintyler4814 8 місяців тому

      The way you solved the problem is so much cooler

  • @AEw5JdbLyvEF
    @AEw5JdbLyvEF 9 місяців тому +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 9 місяців тому +2

      The original was probably already in assembly. :p

    • @electra_
      @electra_ 9 місяців тому

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

    • @evanzhoudev
      @evanzhoudev  9 місяців тому

      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

  • @NatanM
    @NatanM 9 місяців тому +2

    Even braille is backwards compatible, what a shame for Python3

  • @erinlee07
    @erinlee07 8 місяців тому

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

  • @isheamongus811
    @isheamongus811 8 місяців тому

    There were corner ANSI blocks aka AltGr blocks afaik.

  • @hoteny
    @hoteny 9 місяців тому +2

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

  • @DanatronOne
    @DanatronOne 8 місяців тому

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

  • @daxtron2
    @daxtron2 9 місяців тому

    Only 500 views?! This is great work

  • @jyggalag_
    @jyggalag_ 9 місяців тому

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

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

    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.

  • @litfill54
    @litfill54 9 місяців тому

    3:55 lol

  • @Metruzanca
    @Metruzanca 22 дні тому

    This is awesome

  • @matt92hun
    @matt92hun 9 місяців тому +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 9 місяців тому +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

  • @locker47
    @locker47 8 місяців тому

    Awesome! Blind people can now play Tetris! :P

  • @jakeaustria5445
    @jakeaustria5445 9 місяців тому +1

    Why not make it just one pixel for each block

  • @ski3r3n
    @ski3r3n 5 днів тому

    no 7-bag system literally unplayable

  • @ali.005
    @ali.005 9 місяців тому +2

    EVAN ZHOU BACK WITH ANOTHER BANGER?????

  • @gaimnbro9337
    @gaimnbro9337 8 місяців тому

    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

  • @capdyn735
    @capdyn735 9 місяців тому

    This was a cool video!

  • @12...
    @12... 9 місяців тому

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

    • @evanzhoudev
      @evanzhoudev  9 місяців тому

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

    • @Wilker_uwu
      @Wilker_uwu 9 місяців тому

      @@evanzhoudev but have you tried kanji characters?

    • @evanzhoudev
      @evanzhoudev  9 місяців тому

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

    • @SaHaRaSquad
      @SaHaRaSquad 9 місяців тому

      @@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 9 місяців тому

      @@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 5 днів тому

    four wide game

  • @fovspace-rk5xb
    @fovspace-rk5xb 9 місяців тому

    Love it!

  • @chr0matic556
    @chr0matic556 9 місяців тому

    i love this!

  • @__hannibaal__
    @__hannibaal__ 9 місяців тому

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

  • @dsagman
    @dsagman 9 місяців тому

    and when are you making the tetris font?

    • @evanzhoudev
      @evanzhoudev  24 дні тому

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

  • @RedStone576
    @RedStone576 9 місяців тому

    nice

  • @FZs1
    @FZs1 9 місяців тому +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 9 місяців тому +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 9 місяців тому +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 9 місяців тому +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.

  • @j.21
    @j.21 9 місяців тому +2

    a

  • @GTGTRIK
    @GTGTRIK 9 місяців тому

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

  • @MaxwellCatAlphonk
    @MaxwellCatAlphonk 9 місяців тому +1

    Тетрыс

  • @b3at1
    @b3at1 9 місяців тому

    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

  • @boris_raduloff
    @boris_raduloff 9 місяців тому

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

    • @evanzhoudev
      @evanzhoudev  9 місяців тому +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 :)