anyone help how to increase speed in this line

for example in tetris when you clear 20 lines the speedrate of the falling piece will increase how can i do it in my program line here


void DoLogic(int dt)
{

static int time = 0;
time += dt;

int stepRate = 300;

if (time > stepRate )
{
StepPiece();
time -= stepRate;

}
There are many ways you can do this. One way would be to make objects fall at a speed of x + y, where x is whatever speed they fall at originally, and y is a variable that increments every time 20 lines have been cleared.

can you give me some codes that i could copy im only beginner :( btw thanks
some codes that i could copy


I'm not going to and other people should not. That is not the way to learn. If you post a link to your game code, then I can help you out a bit more, but copying + pasting answers is not the way to learn, after all, next time you come across this problem, how are you going to solve it?
btw thanks for the motives :)) ok can you teach me the x and y thing to solve my problem teach me how to use it thanks :) GOdbless
Topic archived. No new replies allowed.