Hello, I've been working on a rather large project for a while now, recently i've been fixing various performance issues and have come across one that I cannot fix.
The framerate seems to stutter, like every second one of the frames takes 3x as long as usual. As you could imagine, it makes the game feel very laggy even though its supposedly running above 120 fps.
In this image you can see gaps in the trail (one dot for each physics tick) left behind the player due to the stuttering.
Here I made some charts showing the stuttering
https://docs.google.com/spreadsheets/d/1xhJ4jbfifPfdcIPZsKiU_f0-IVT453xlORrHtwMfyLQ/edit?usp=sharingThe most disturbing part, is the stutters seem to exist in the green-circle tutorial.
I am using SFML 2.1, codeblocks with the GCC compiler, on windows 8.1 (more info at bottom of post)
Other games run smoothly, so this is not a system wide issue.
Things I have tried
*I have already tried every combination of framerate limit and vsync, before that gets inevitably mentioned.
*There is not visible difference between a debug build and a release build.
*Rendering to a window directly instead of a render texture (not a permanent solution anyways because i need that texture to scale the game down for smaller resolutions)
*Strategically positioning the clear() command in many different places, including the correct one.
Things I have not tried:
*SFML 2.4, i cant get it to work due to (what I assume) is a compiler missmatch, which i cant fix because there is no way for me to find out what version of GCC I am using (as far as I know)
*Other compilers, visual studio is 9 gigs, that would take a week to download with my internet
*Other operating systems, i don't have a working linux partition at the moment, and the only mac I have available is running 10.4 I have confirmed the bug happens on windows 8.0 and windows 8.1
Here is a link to a zip of my full project. You should be able to simply open it up (the project file is called Ambure) in codeblocks and hit compile. (the blue refreshy compile, not the normal yellow gear one)
To control the player (it spawns invisible), press space and then move around with the arrow keys.
Press the home button on your keyboard to access the devtools if you want to mess around with the engine.
The frametime is dumped to the console, the cout statement for that is in main.cpp
Link to Full Project .ziphttps://drive.google.com/file/d/0B16tFq7OKBQzZ3Yxd2JwWDhMeGM/view?usp=sharing
Link to project Devlog of the Project
https://forums.tigsource.com/index.php?topic=57907.0More system information:
http://imgur.com/bk0Ow1phttp://paste.ubuntu.com/23216796/Similar posts I have found that may be related but do not help me solve the problem
http://gamedev.stackexchange.com/questions/67212/why-do-i-have-to-run-my-2d-game-at-300-fps-for-movement-to-be-passably-smoothhttp://en.sfml-dev.org/forums/index.php?topic=6854.0I hope that is enough information.