Okay, I'm having a bit of a problem with a game I have been developing for a while now but I'm not sure how to give a good explenation of what's going on without giving out the entire source code, so I'm hoping that this problem sounds familiar to someone and I can be pointed in the right direction, because at the moment, I am completely stumped.
Okay so the game is a basic 2D vertical scrolling shootemup. I'm using Direct3D to render my sprites as a simple texture rendered onto 4 verts, and I have just converted my time stepping from variable to fixed, however I noticed this problem slightly before I decided to change the time stepping.
The problem itself is that basically any moving sprites to not move smoothly. They will move for a few seconds fine, but every few seconds theres a bit of a jump that sometimes is barely noticable and other times makes it very ugly to watch.
I've traced through the code quite a few times, profiling different areas, such as how often render is called and how often update is called. I'm also pretty sure there are no runaway loops or major bottlenecks in the code. I have a hunch that it is because using fixed time steps sometimes allows large gaps of no updates and then suddenly it calls update several times. But that doesn't explain why I was noticing it while I was using variable time steps.
In case youre wondering my fixed time steps are worked out with the following code
realTime = CurrentTicks() - startTime;
while(gameTime \< realTime)
gameTime += TIME_STEP;
What I've noticed is that Update may not be called for aprox 4 calls to render on average, but sometimes there is a spike in this and it may not be called for 5 or 6 times and I think that is what is causing the jitter. However I'm really not sure and I'm finding it harder and harder to describe my theories.
Anyway, I'm just wondering if anyone else has had similar experiences and what the cause/solutiuon was. I'm hoping it might give me some ideas or help me see the light at the end of the tunnel. It just seems like I might have to live with it for now, but I dont want to code much more in case it makes it more complex to fix later on
Thanx in advance to anyone who even takes the time to read my ramblings