views:

493

answers:

1

Which one performs better to run a game main loop?

+3  A: 

There's a new option in RC0, it's the CompositionTarget.Rendering event. It seems to have promise for being the best option.

As for other game loop methods, it's generally accepted that the empty Storyboard is best. So I'd recommend the new Rendering event first, and if that seems to have issues, go with the empty Storyboard.

I've got a bit here on the new Rendering event:

http://silverlightrocks.com/cs/blogs/silverlight_games_101/archive/2008/09/26/a-much-cleaner-game-loop-in-silverlight-2-rc0.aspx

Bill Reiss
The blog post Bill Reiss posted no longer exists. Try the MSDN reference for CompositionTarget.Rendering: http://msdn.microsoft.com/en-us/library/system.windows.media.compositiontarget.aspx
Rafe