locked
Setting Max FPS RRS feed

  • Question

  • Has anybody successfully set the max FPS of a game or any other app?  I've used:

    Application.Current.Host.Settings.MaxFrameRate = 30

    This seems to work most of the time but occasionally it will go way above 30 and on some machines the MaxFrameRate seems to be completely ignored.

    P.S. Microsoft, please fix the posting of threads etc in Chrome, all the newlines being stripped out is really annoying. 

     

     

     

    Sunday, May 16, 2010 7:09 AM

All replies

  •  Yep,

    We run This site on 24fps with object param tag like

     

    <param name="maxFrameRate" value="24" />

     I've aslo did some more work to enable different animations run on different frame rate and blog about it here.

    Hope will help you.

    Sunday, May 16, 2010 11:22 AM
  • I'm seeing similar issues but I think it is a new problem with the Silverlight 4 runtime. I'm trying to get more details and I'll let you know if I learn anything. I assume you're using CompositionTarget.Rendering, right?

    In my case, for a recent game I created, I set the MaxFrameRate to 30 but on a machine with Silverlight 4 installed, it shoots way above 30 fps sometimes when a rotate transform is applied to the main Canvas (in the game, you rotate with the arrow keys).

    But I don't seem to see this issue on anothe rmachine with the Silverlight 3 runtime installed.

    Are you seeing a similarity here (SL3 vs SL4 behavior?)

    Monday, May 17, 2010 9:05 AM
  • Andy,

    Your game does indeed play at 31 FPS most of the time here. But I've seen it increase to 49. Not many times though.

     My SilverlightVersion: 3.0.50106.0

     

    Monday, May 17, 2010 1:23 PM
  • Hi Andy,

    I do indeed use the CompositionTarget.Rendering event.  I assume it is to do with SL4, my game is SL4 only so cannot test in SL3.

     

    Monday, May 17, 2010 1:29 PM