I am making a game for wp7 using silverlight/xna.
In the pre made code the game loop is setup like this:
[source lang="csharp"]GameTimer timer;public MyGame(){ timer = new GameTimer(); timer.UpdateInterval = TimeSpan.FromTicks(166666); timer.Update += OnUpdate; timer.Draw += OnDraw;}private void OnUpdate(object sender, GameTimerEventArgs e){}private void OnDraw(object sender, GameTimerEventArgs e){}[/source]
When the game runs, it lags precisely one time a second;
From my understanding the GameTimer suspends a frame if the frame is using more time than it should.
My game is pretty simple and the game runs fine on all the other frames, so why is this happening only one time per second?
I have Googled around and this seem to be a common problem. But I can't find a solution to it.
If someone have had this problem or know a solution I would be very happy if you can share it with me.
Edited by Lars-Kristian, 21 October 2012 - 12:45 PM.







