SFML community forums
Help => Graphics => Topic started by: kol on October 18, 2013, 09:24:41 pm
-
When I'm running my game, he's taking small breaks. What can it be? Not heavy, has nothing in the loop just draws a sprite.
Sorry, my bad english.
-
Can you provide a minimal and complete example that reproduces the issue?
In which way do you experience those "breaks"? Is it during movement or just fps drops?
-
In the drawing, if I put a variable (int) and show the screen with the sf :: text, gives waged from time to time.
-
I have no idea what "waged" means.
I think you're going to have to post (complete and minimal) code and screenshots of the problem for us to have any idea what you're talking about.
-
http://www.youtube.com/watch?v=k3_2ZcLux_8&feature=youtu.be
Look at the video, the movement is never constant, always gives small lag
-
Try turning on VSync:
window.setVerticalSyncEnabled(true);
-
You kind of blaze by your main loop so I couldn't tell if you used a fixed timestep or not. In case your not, try this: http://gafferongames.com/game-physics/fix-your-timestep/
-
I managed to get a look at the loop.
https://github.com/SFML/SFML/wiki/FAQ#wiki-graphics-smooth-animation
-
Thanks to all, solved ! :)