SDL Smoother movement in game
问题 I have got a small problem with my game. It is not a big deal but I'd love to sort this out. So this is my input processing function: void MainGame::processInput() { SDL_Event evnt; while (SDL_PollEvent(&evnt)) { switch (evnt.type) { case SDL_QUIT: _gameState = GameState::EXIT; break; case SDL_MOUSEMOTION: break; case SDL_KEYDOWN: switch (evnt.key.keysym.sym) { case SDLK_RIGHT: player.movePlayer(1); break; case SDLK_LEFT: player.movePlayer(2); break; } } } } and it works just fine, but as you