XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

Timing issues

Last post 05-09-2008 9:50 AM by spin0r. 2 replies.
  • 05-09-2008 7:18 AM

    Timing issues

    I'm currently working on a top down shooter game, and the speed I move the objects at is scaled by gameTime.ElapsedGameTime.Milliseconds to make sure they move at a constant speed independent of the framerate.  However, sometimes there are stutters and they don't always seem to move at a constant speed.  I thought this could be cause by sudden drops in the framerate so I tried smoothing the value with previous frametimes, but this still does not give the desired result.  I also remember reading somewhere that GameTime is not very accurate on the Xbox360 so I tried to use DateTime.UtcNow.Ticks instead, but this does not seem to make any difference at all.  Any thoughs on this issue would be greatly appreciated.

    Regards,
    Dennis

  • 05-09-2008 7:44 AM In reply to

    Re: Timing issues

    This thread may help.  It's also possible that stuttering is a result of garbage collection, so make sure you're not repeatedly creating and deleting a lot of reference types.

    Good judgment comes from experience, and experience comes from bad judgment.  -- Barry LePatner

    Sixty years ago I knew everything; now I know nothing; education is a progressive discovery of our own ignorance. -- Will Durant, American philosopher/author [1885-1981]

  • 05-09-2008 9:50 AM In reply to

    Re: Timing issues

    Thanks! I'll give TotalMilliseconds a shot.
Page 1 of 1 (3 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG