In this part, we will handle logic for the game. Calculate score, level and make game loop.
Part one here: https://youtu.be/Z1NRAT98RM8
Don't forget to click the like button and share the video with your friends if you found the video useful.
Make sure to SUBSCRIBE for more AWESOME video just like this one !
---------- CONTACT ----------
Facebook: https://www.facebook.com/trananh2001
Github: https://github.com/trananhtuat
---------- LIB ----------
Boxicons: https://boxicons.com
Google font: https://fonts.google.com
---------- TIMESTAMPS ----------
00:00 - Demo
00:47 - Define constant variables
05:22 - Make new game grid
08:07 - Reset grid
09:14 - Make new tetromino
10:50 - Draw tetromino to board
12:43 - Clear tetromino
13:25 - Move tetromino down
14:38 - Check tetromino movable
19:05 - Move tetromino left and right
19:41 - Add keyboard event
21:55 - Rotate tetromino
26:00 - Hard drop tetromino
28:21 - Update fall tetromino to board
29:56 - Delete full filled row
33:55 - Define game objects
35:06 - Handle game loop
35:40 - Calculate game score and level
---------- WATCH NEXT ----------
Responsive Landing Page Using HTML CSS & JavaScript: https://youtu.be/xKT-MOgm2Ss
Creative Personal Portfolio Website: https://youtu.be/z4sX782AxDc
Responsive Food Landing Page: https://youtu.be/_A7diZfXMkc
Responsive Login and Registration Form with Animation: https://youtu.be/5tVNFuKNsfw
Responsive admin page: https://youtu.be/bcyPawjQUSs
Nike shop landing page: https://youtu.be/5qg4rpD-OX4
Fullscreen slider: https://youtu.be/6nfykVzLLAE
---------- MUSIC ----------
Song: Luke Bergs - Chill
Music provided by Vlog No Copyright Music.
Video Link: https://youtu.be/i15kfJPhG0Y
Song: MusicbyAden - Distant
Music provided by Vlog No Copyright Music.
Creative Commons - Attribution-ShareAlike 3.0 Unported
Video Link: https://youtu.be/7TGAomURLp4
Song: Tobjan - Memories
Music provided by Vlog No Copyright Music.
Creative Commons - Attribution 3.0 Unported
Video Link: https://youtu.be/AlG68LXJmwo
Song: DayFox - Riding The Wave
Music provided by Vlog No Copyright Music.
Video Link: https://youtu.be/g4_XaC8IJsg
--------------------------
#HTML #CSS #JavaScript #tetris #gameprogramming #JavaScriptGame