How to Properly Rotate Tetris Pieces - Game Development Tutorial

Published: 26 December 2018
on channel: Turbo Makes Games
25,725
441

Hello all, in this tutorial video I will be showing you how to properly program Tetris rotations using the "Super Rotation System." This system works really well because it performs several "offset tests" to offset the piece if a proper rotation cannot be made in its current location. This also opens up the possibility of some very high level Tetris play where you can rotate pieces into tight spaces.

I will be implementing this system using C# in Unity, however I explain the theory and pseudocode behind all of this, so you should easily be able to translate it to any language or game engine you like. Enjoy!

Read more about the Super Rotation System: https://harddrop.com/wiki/SRS
Source code for project: https://github.com/JohnnyTurbo/LD43

Time Codes:
0:00 - Intro/overview
Terminology
2:38 - Board
3:07 - Pieces/Tiles
Super Rotation System Explained
4:16 - Rotation Indexes
5:24 - Rotation Offsets ('O' Piece)
8:11 - Rotation Tests
C# Scripts Introduced
9:53 - BoardController.cs
10:57 - PiecesController.cs
11:25 - PieceController.cs
11:53 - TileController.cs
12:29 - SRS Pseudocode/Algoritm Explained
18:05 - Programming the SRS in C#
29:49 - Demonstration of SRS in Unity
34:33 - Outro

Please 'Like' this video and share it with anyone who is interested in video game development.

Subscribe to the channel for much more independent video game developer related content including tutorials, design breakdowns, industry events, VLOGs, and much more fun stuff!

Links:
Blog:
https://turbomakesgames.com

My Game Development Studio's Website:
https://homecookedgames.com

My GitHub:
https://github.com/JohnnyTurbo

Music by: Joakim Karud    / joakimkarud  

My Setup:
Camera - Yi Action Cam - https://amzn.to/2FSRxLk
Webcam - Logitech C922x Pro - https://amzn.to/2HTinFp
27" 4K Monitor - Asus PG27AQ - https://amzn.to/2Mkg7X2
Laptop - Asus GL502VS - https://amzn.to/2FNKiET
Keyboard - Das Keyboard 4 Ultimate - https://amzn.to/2W7SHZd
Other Keyboard - Ducky One 2 Mini - http://bit.ly/2I8ivQI
Headset - PlayStation Platinum Wireless Headset - https://amzn.to/2FR6n58

As an Amazon Associate I earn from qualifying purchases.

#Tetris #TetrisRotations #GameDevelopmentTutorials


Watch video How to Properly Rotate Tetris Pieces - Game Development Tutorial online without registration, duration hours minute second in high quality. This video was added by user Turbo Makes Games 26 December 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 25,725 once and liked it 441 people.