title: My SFML/C++ program is working as expected but how to make movement slow?
body: <p>I made a circle as our player and setted gravity but it is working so much faster and I can't even see. I think it has to do something with sf::time or sf::clock but how? I didn't actually got these two so any code example and explanation would be appreciated. Here is my code:- <br></p>
  
  <pre><code>#include &lt;SFML/Graphics.hpp&gt;
  
  int main()
  {
      sf::RenderWindow window(sf::VideoMode(800, 600), "SFML works!");
      sf::CircleShape shape(20);
      shape.setFillColor(sf::Color::White);
      shape.setPosition(380, 550);
      shape.setOutlineColor(sf::Color::Green);
      shape.setOutlineThickness(3);
  
      while (window.isOpen())
      {
          sf::Event event;
          while (window.pollEvent(event))
          {
              if (event.type == sf::Event::Closed)
                  window.close();
              if(sf::Keyboard::isKeyPressed(sf::Keyboard::Up))
                  {
                      shape.move(0, -100);
                  }
                  if(event.KeyReleased)
                  {
                      if(event.key.code == sf::Keyboard::Up)
                      {
                      int x[] = { 10, 10, 10, 10, 10};
                      for (int y = 0; y &lt;= 4; y++)
                      {
                          shape.move(0, x[y]);
                      }
  
                      }
                  }
  
          }
  
          window.clear(sf::Color::Black);
          window.draw(shape);
          window.display();
      }
  
      return 0;
  }
  </code></pre>