I'm attempting to make a Tetris clone and want to be as accurate to the games as I can. I found a chart that explains the speed curve that's supposedly used in games that follow the official Tetris guideline: https://harddrop.com/wiki/Tetris_Worlds
1G = 1 cell per frame
- Level 1: 0.01667G
- Level 2: 0.021017G
- Level 3: 0.026977G
- Level 4: 0.035256G
- Level 5: 0.04693G
- Level 6: 0.06361G
- Level 7: 0.0879G
- Level 8: 0.1236G
- Level 9: 0.1775G
- Level 10: 0.2598G
- Level 11: 0.388G
- Level 12: 0.59G
- Level 13: 0.92G
- Level 14: 1.46G
- Level 15: 2.36G
Another thing that might be worth noting is, like most Tetris games, my loop is updating at 60fps.
So given all this, there are two things that I'm having problems understanding.
1: The speed curve doesn't always translate to whole numbers.
For example, at level 2: 1 / 0.021017 = 47.5805300471
. So every 47.5805300471 frames the game is supposed to drop the piece one row. Am I supposed to round these numbers? I can't process a partial frame so I don't understand why the speed curve comes out as a decimal.
2: Level 14 and 15 drop the piece more than one row per frame
Because it's dropping more than one row per frame, this would make some moves impossible in the game. For example, if I wanted to move a piece horizontally into a one cell space and the game is dropping the piece more than one row at a time, it will skip the row entirely and make the move impossible. Is this correct or am I missing something?