retrowars/retrowars

[Tetris] Speed acceleration over line 90 is much higher

Porrumentzio opened this issue · 3 comments

The question here is whether this is intended. When reaching line 90, the blocks go down more and more speeder each time than they accelerate until 90.

Thanks for the report. Could I ask for a little clarification? Are you saying that:

  • The speed continues to increase beyond 90? e.g. Line 110 is faster than 100, and 120 is faster still?
  • The speed continues up until 90 and then stops increasing?
  • The speed is too fast at 90 lines?

For reference, here is the code that manages how the speed is chosen dependent on the level:

/**
* Following the original GameBoy tetris speeds.
* That version runs at ~60 FPS, and the number of frames per time step is available at:
* https://harddrop.com/wiki/Tetris_(Game_Boy)#Details
*/
private val TIME_STEPS = listOf(
53 / 60f,
49 / 60f,
45 / 60f,
41 / 60f,
37 / 60f,
33 / 60f,
28 / 60f,
22 / 60f,
17 / 60f,
11 / 60f,
10 / 60f,
9 / 60f,
8 / 60f,
7 / 60f,
6 / 60f,
6 / 60f,
5 / 60f,
5 / 60f,
4 / 60f,
4 / 60f,
3 / 60f,
)

And below that is the code which converts the current level into one of these speeds:

fun timeStep() = TIME_STEPS[level().coerceAtMost(TIME_STEPS.size - 1)]
fun level() = lines / 10

I am constantly amazed by the level of detail provided by enthusiasts on the internet. Here is the source of the speeds from the original GameBoy version I wanted to model on:
https://harddrop.com/wiki/Tetris_(Game_Boy)#Details

I meant that if until line 90 the speed increases 5 by 5 each 10 lines (10=5, 20=10, 30=15, 40=20...), when reaching line 90 this increase seems kind of exponential: 90=45, 100=70, 110=90

I don't know how the original GameBoy version is, neither I am asking to change this. Only, it seemed strange to me that over 90 the speed is proportionally much higher than before, and maybe that was a bug on the code (I don't understand the code where this is defined!)

And great thanks for such a wonderful game!

@Porrumentzio - Thanks for the clarification. Just revisiting older issues and figuring out whether to action them or not. For this one, while I appreciate the clarifications, we'll leave it as is.

I did try a few games to see how it felt, and I was able to successfully navigate the highest speed setting, but only when I already had a pretty clean slate to start with. When I was in a bit of a pickle the extra speed really stuffed me up 🤣.