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.
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.
@@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
@@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.
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.
Agreed. 💯
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.
i aint even gonna pretend i can understand this at that speed
Lol, u can try running the source code, makes more sense when you see it in action
This is the most chaotic coding video I have ever seen lmao.
guy makes god tier quality videos
quality content
Underrated channel. 794 subs? lemme change that!
Thanks a bunch ♥️
I see you've used the gerarra hea at the end of the video, amazing😂
😅 Thanx for letting me borrow it
This video summaries more or less half of my first ever programming course at uni lol
pro
Ok, now for those of us like myself who cannot code at lightning speed, please make another where we can actually follow along. 😂
Got it. I'll make the next one twice as fast
I did in 1 second
W
2:34 why else if spam
The processing time difference between if and switch statements is pretty much nonexistant when you're using 7 conditions
why braindead anti else if spam
@@christianchung9412 I say it once!
@@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
@@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.