![]() ![]() This is easily fixed by moving a few lines around:Īll we’ve done here is shift the bottom row to the top row in the 3rd and 4th rotations, such that the non-corner square of the T-piece now always occupies the same point in the 4×4 grid and is thus the center of rotation in all cases. In the definitions of T-piece rotations above, the bottom two rotation states have a different center of rotation to the top two. ![]() This is so that when the player rotates a T-piece, only the three corners of the T move, with the other square which connects them remaining at the same point on the board. For T-spins to work, the square which connects the three corner squares should always remain in the same place when the rotation is performed (ie. ![]() This is part of the array which contains the basic layouts of all the tetriminos in each of their possible rotation states. The first problem can be found in the actual data definition of the T-piece: Since the collision detection code that executes in SimpleTetris when a piece is rotated merely checks if the rotated piece is touching anything already in the bucket – crucially, not caring about whether the rotation was actually possible in the first place or not – this should have just worked, but it doesn’t. This ‘impossible’ rotation of T-pieces where in real life the piece would be locked into place is the premise of the T-spin.įor those not in the know, the Tetris Wikia T-spin page has some excellent explanations and diagrams of what T-spins are namely, when you rotate a T-shaped Tetris piece in a way that would be impossible in real life (due to the corners being obstructed by other blocks) such that it fits snugly into a T or notch-shaped hole (see image). The orange-coloured T-piece here will fall 2 more rows, at which point it can be rotated such that it will complete the bottom 2 rows. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |