Looks like VS 2010 editor and the blend editor have some code base.. I was pleasantly surprised to see C# intellisense in blend, I was only expecting XAML intellisense.
WPF 3.5 SP1 (Beta) introduces the ability to apply Pixel Shader effects to any UIElement, these will executed by GPU by compatible cards. Greg Schechter's blog is an excellent place to start learning about these features. Shader Effects have long been used in rendering pipeline, to create great special effects. And nowadays are used by almost every game engine to enhance the visual aspects of the game play. Another good tutorial and Check out the HLSLTester code , it is helpful in creating new effects here . I have used the Shader code from this page and added some dynamic properties to create the following effect. Download the full code for this demo from here . Download the compiled effect .
One the first code for any game will be setup a game loop. Here are some of the posts on how to achieve this in Silverlight applications: Creating a Game Loop - Silverlight Games 101 Tip of the Day #5: Timers and the Main Game Loop - Mike Snows Silverlight Blog Silverlight-Speed Loop You can see that there are two ways, one using the DispatchTimer and one using Storyboard. However I found that " The DispatcherTimer is a lower resolution timer than the timer behind the Storyboard class, which causes loss in fidelity. Additionally, the Storyboard execution is more stable across the different supported OSs and Browsers. I'll put together a sample to show the comparision. " as stated in post Procedural Animation in Silverlight 2 | Adam Kinney, Continuum Explorer So for my game I started using the empty storyboard method. But then I noticed that I getting only 60-62 FPS (frames per second) even when doing zero computations. This was causing some edge conditions manifest in col...
Comments