Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] Keyboard Input: Actions are running too fast  (Read 2570 times)

0 Members and 1 Guest are viewing this topic.

m3nf1s

  • Newbie
  • *
  • Posts: 2
    • View Profile
[SOLVED] Keyboard Input: Actions are running too fast
« on: February 25, 2022, 01:00:38 pm »
Hello, all!

I wrote my own Tetris https://github.com/m3nf1s/SFML-Tetris
When I press the buttons, actions are running too fast

I set low fps, but my Input has Input lags. I set KeyRepeatEnabled(false), but it doesn't work (Idk why)

I read articles about deltaFixedTime, but I think that It doesn't work for me because I move my figure not by pixels, but relative to the gamefield array.

How can I fix it?
« Last Edit: February 25, 2022, 04:19:50 pm by m3nf1s »

m3nf1s

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Keyboard Input: Actions are running too fast
« Reply #1 on: February 25, 2022, 04:18:33 pm »
I found answer

It was necessary to move my PlayerInputController move to window.pollEvent loop