Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Chris Cavanagh, physics modeler extraordinaire, has created a Silverlight based physics modeler. This is a fun sample to play with but I noticed in his blog post that he's using the HtmlTimer. This class is a wrapper on the javascript setInterval method and as such has a relatively low priority for calling back to the user. This is why the class is marked obsolete. The best way to build a high priority timer in the Silverlight v1.1 alpha is to use a XAML animation and hook it’s completed event. The Lumines video player I wrote uses this. I’ve let Chris know about this trick and hopefully he’ll incorporate this. I have a feeling this is the cause of the stuttering he’s seeing. In v1.1 we will be adding a proper timer class to replace the HtmlTimer.
Click the image below to run the sample. More info and a promise of source code can be found in Chris’ blog post.
Comments
Anonymous
May 24, 2007
PingBack from http://blogs.msdn.com/mharsh/archive/2007/05/24/chris-cavanagh-s-silverlight-physics-simulator.aspxAnonymous
May 24, 2007
I've changed the demo to use a Storyboard (much nicer) and the source code is now available! http://chriscavanagh.wordpress.com/2007/05/24/silverlight-2d-physics-source-code/Anonymous
May 24, 2007
This simulater started me thinking about arcade games (the simulater looks a lot like an arcade game). Silverlight may be used to port 2D arcade games from XBox.Anonymous
May 27, 2007
Silverlight news - May 27,2007Anonymous
March 07, 2008
Silverlight 2 has a Timer (DispatcherTimer)