We will create the TETRIS game using JavaScript only, means no framework is been used during the tutorial, the tutorial has two parts:
1st part : we understand everything about the game, we discuss things before we code.
2nd part : Type in the Code. ( you can go to the 2nd part directly : https://youtu.be/HEsAr2Yt2do?t=48m20s ).
****************************************************************************************
Download the starter template from gitHub, so you can follow the tutorial step by step :
****************************************************************************************
The Game link : https://github.com/CodeExplainedRepo/Tetris-JavaScript
****************************************************
Other Tutorials for games created using JavaScript :
****************************************************
Snake : https://www.youtube.com/watch?v=9TcU2C1AACw
Flappy bird : https://www.youtube.com/watch?v=L07i4g-zhDA
*************
Social Media
*************
Facebook : https://web.facebook.com/codeXplained
Twitter : https://twitter.com/code_explained
************
HASHTAGS
************
#JavaScript #Games #JavaScriptGames
Original source
18 responses to “Tetris Game Using JavaScript”
when you added the first piece, after the p.draw thing, it pops up a error on inspect, that .length of undefined cannot be read, at line 73
Thank you for the very well explained, in depth tutorial. This very much helped me gain more understanding on working on 'canvas' . No complaints, much appreciated!
Sweet Video! Is there a way to remove the black lines in the game board but keep the outer black lines?
i dont know why but i never saw a single thing in my browser…
Dude, make more. Thanks for your detailed tutorials!
Thanks you very match!
didn't know tetris had a visible grid
Awsome tutorial. Thnk you sir.
Excellent!!! Thank you!!!
isnt ctx.scale(20,20) better?
Great work , you explain steps very good way , any courses on udemy ?
Just a heads up on the title
Pure !== Vanilla
Pure = Functional non-mutating code
Vanilla = Without any dependencies
Gonna go through this really soon
Thanks bro
Thank You. You are explaining very well all the details. Could you make another project about how to make a multiple choice test? Please share more project or Javascript Lessons with real-life project like that, memory game, multiple choice test. Thanks again.
Awesome! Keep up the good work. Will share with all my friends.
This looks awesome, shared this with some friends who want to try JS but fear a big time commitment.
Damn. Gonna watch this when I get the time.