Quality-of-life on Tetris games
Last weekend, we participated in the Ludum Dare game jam for the 10th time. It's a worldwide event about building a game over the weekend based on a theme revealed when it starts. It's the largest by number of games, and some very famous titles like Evoland, Mini Metro, Hollow Knight, VVVVV or Nuclear Throne were born at it.
The theme for this edition was Depths, so we made a sort of reversed-tetris in which you dig pieces instead of placing them, always trying to not disconnect the board. Everytime you clear the top row, you go a line deeper. You can play it here:
While building it, we realized how many underappreciated mechanics Tetris have, that make the gameplay more pleasant.
The 7-bag
Most modern versions of the game use this mechanic to make things easier for the player. Basically, you start by taking the 7 tetris pieces, adding them to the bag of next pieces and shuffling it. Once the bag is empty, you repeat the process. This has two implications:
- Your most needed piece is never more than 13 pieces away in the worst case: 6 to finish the current 7-bag and 7 to reach the end of the next one.
- You will never see 3 times the same piece in a row.
Before we implemented this, we played entire games with not a single stick piece in over ~30 pieces, or games with 3 square pieces in a row that made the entire thing impossible. Nowadays, every single commercial tetris game released uses some version of this. In some cases, it's a 14- or 35- bag to make it a bit less predictable.
The NES rotations
Rotating pieces is actually a tricky thing. If you would simply rotate each piece from its center of mass, you'd end up with a piece that is misaligned with the game grid. However, if you somehow rounded the positions to exact tiles afterwards, your controls would be counterintuitive. Which is why the rotations in most Tetris games are hardcoded to the ones in the NES version of the game, which is regarded as the most intuitive one, and the one used in tournaments:
Real computed rotation
NES hardcoded rotation
The wall kick
The name is pretty describing. Basically, if your piece is close to a wall so that rotating it wouldn't do anything, the game checks if rotating would work by moving it to the right/left. You can see it in action here:
Most modern tetris-like games also implement this. There's even a long list of strategies you can use to save yourself from complicated situations.
Hope that was interesting! If you want to check out the game in the jam page, it's here: SIRTET.
Comments
Minecraft wasn't started for Ludum Dare. Maybe you're thinking of Minicraft?
Thanks for the fact-checking, you're right, that's Minicraft. It was also developed by @notch, 15 days after Minecraft was first released. I have changed the trivia to other games that started at LD (there's a lot to pick from).
I personally ptefer the game boy version