Coding TETRIS in 3 Minutes

Поділитися
Вставка
  • Опубліковано 8 вер 2024
  • Source Code: github.com/Div...
    Twitter: / divine203_

КОМЕНТАРІ • 30

  • @HerrDoktorWeberMD
    @HerrDoktorWeberMD 7 місяців тому +29

    been seeing a whole bunch of "tetris from scratch" videos in my feed lately, this is an awesome exercise for programming, especially if you wanna learn to make games from scratch.

  • @clarisrichter7966
    @clarisrichter7966 6 місяців тому +4

    I've made countless grid based puzzle games over the past few years, but I've never really paused for a second to figure out how Tetris would be built. This video literally summed it up perfectly in 3 minutes.

  • @brockm2263
    @brockm2263 5 місяців тому +4

    i aint even gonna pretend i can understand this at that speed

    • @divine203
      @divine203  5 місяців тому

      Lol, u can try running the source code, makes more sense when you see it in action

  • @Freeze-2222
    @Freeze-2222 7 місяців тому +11

    This is the most chaotic coding video I have ever seen lmao.

  • @gaargant
    @gaargant 7 місяців тому +4

    guy makes god tier quality videos

  • @nakcy
    @nakcy 7 місяців тому +6

    quality content

  • @stickmanland
    @stickmanland 7 місяців тому +2

    Underrated channel. 794 subs? lemme change that!

    • @divine203
      @divine203  7 місяців тому

      Thanks a bunch ♥️

  • @GameCookDev
    @GameCookDev 7 місяців тому +3

    I see you've used the gerarra hea at the end of the video, amazing😂

    • @divine203
      @divine203  7 місяців тому

      😅 Thanx for letting me borrow it

  • @hd-bild1513
    @hd-bild1513 5 місяців тому

    This video summaries more or less half of my first ever programming course at uni lol

  • @Exotic69420
    @Exotic69420 7 місяців тому +1

    pro

  • @PaulMountney
    @PaulMountney 7 місяців тому

    Ok, now for those of us like myself who cannot code at lightning speed, please make another where we can actually follow along. 😂

    • @divine203
      @divine203  7 місяців тому +4

      Got it. I'll make the next one twice as fast

  • @Rector-ku5no
    @Rector-ku5no 6 місяців тому +1

    I did in 1 second

  • @roletds2227
    @roletds2227 7 місяців тому

    W

  • @imaadhaq540
    @imaadhaq540 7 місяців тому +1

    2:34 why else if spam

    • @mebestupid7134
      @mebestupid7134 7 місяців тому

      The processing time difference between if and switch statements is pretty much nonexistant when you're using 7 conditions

    • @christianchung9412
      @christianchung9412 7 місяців тому

      why braindead anti else if spam

    • @imaadhaq540
      @imaadhaq540 7 місяців тому

      @@christianchung9412 I say it once!

    • @imaadhaq540
      @imaadhaq540 7 місяців тому +2

      @@mebestupid7134 He already has the data stored inside the object and is literally just using the statements to index. neither an if nor a switch would be optimal. It is faster and shorter to just return this.pieces[type] or to just use that instead of having a function

    • @divine203
      @divine203  7 місяців тому +1

      @@imaadhaq540 lol...funny enof until like a day ago, I didn't know accessing object properties using a variable as a key, was actually a thing in JS. Your right `return this.pieces[type]` is a more concise way to do it.