Silverlight Games 101

Write games in Silverlight 2 using C# by Bill Reiss
Our upcoming Silverlight book for beginners (includes a great chapter on game development in Silverlight!) Hello! Silverlight 2 with Dave Campbell, available online now!



Pages

    Recent posts

    Navigation

    Archive

    Blogroll

      Tampa Divorce Lawyer

      North of Tampa in Lutz, Florida. A Tampa Divorce Lawyer focusing on family, divorce, and real estate law.

      Disclaimer

      The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

      Silverlight Sports Game Contest Results

      The TeamZone Sports Silverlight Sports Game Contest is over, and the judges have weighed in. We had some great entries but could only pick 3, so here they are:

      First Place: Hook Shot by Andy Beaulieu

      Second Place: Ball Blocks by Matt Casto

      Third Place: John Brummel University's Blunderbuss Olympics Vol. 1 by David Sushil

      You can check out the winners and all of the entries here:

      http://www.teamzonesports.com/silverlightgamecontest

      Posted: Sep 30 2008, 08:35 by Bill Reiss | Comments (7) RSS comment feed |
      • Currently 0/5 Stars.
      • 1
      • 2
      • 3
      • 4
      • 5
      Filed under:

      A much cleaner Game Loop in Silverlight 2 RC0

      Silverlight 2 RC0 is now available. See the details here:

      http://weblogs.asp.net/scottgu/archive/2008/09/25/silverlight-2-release-candidate-now-available.aspx

      They've made it much easier to do a game loop now with a new event that has been added. This event fires before the rendering of each frame. So now you don't need an empty Storyboard or a DispatcherTimer. Let's see how we can animate a rectangle, here's the page.xaml:

      <UserControl x:Class="SilverlightApplication34.Page"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
          Width="400" Height="300">
          <Canvas x:Name="LayoutRoot" Background="White">
              <Rectangle x:Name="rect" Fill="Red" Width="50" Height="50"/>
          </Canvas>
      </UserControl>

      Then for the game loop, all you need to do is something like the following:

      public partial class Page : UserControl
      {
          double x = 0;
          public Page()
          {
              InitializeComponent();
              CompositionTarget.Rendering += new EventHandler(CompositionTarget_Rendering);
          }
       
          void CompositionTarget_Rendering(object sender, EventArgs e)
          {
              x+=.3;
              rect.SetValue(Canvas.LeftProperty, x);
          }
      }
       

      You can then add things like elapsed time between renders, etc. I'll follow up with a post on converting the game loop logic covered before to use this method.

      Posted: Sep 26 2008, 13:10 by Bill Reiss | Comments (22) RSS comment feed |
      • Currently 0/5 Stars.
      • 1
      • 2
      • 3
      • 4
      • 5
      Filed under:

      Silverlight Sports Game Contest deadline tonight

      I can't believe it's already here, but we're reaching the deadline for submissions in the TeamZone Sports Silverlight game contest. If you've been working on a game, make sure it's submitted by Midnight Eastern time on Monday September 8.

      Submission instructions here: http://www.teamzonesports.com/silverlightgamecontest/submit

      Drop me a note if you have any questions.

      Posted: Sep 08 2008, 14:04 by Bill Reiss | Comments (1) RSS comment feed |
      • Currently 0/5 Stars.
      • 1
      • 2
      • 3
      • 4
      • 5
      Filed under:

      Tampa User Experience Users Group First Meeting September 10

      The Tampa User eXperience User Group will have its first meeting next Wednesday. The presentation will be MS Ajax Client Script 101 by Jay E. Kimble. tux penguinWe will be meeting at  Answers Systems (4029 Tampa Road, Oldsmar, Fl 34677... right next to the Oldsmar Fleamarket).

      Pizza and drinks will be supplied, so come on out. One lucky winner will walk away with an MSDN Premium subscription!

      No web site yet, but go to Jay's blog here if you plan on coming and let him know:

      http://theruntime.com/blogs/jaykimble/archive/2008/09/03/tux-tampa-ux-is-next-wednesday-sept.-10th-at-630pm.aspx

      Posted: Sep 04 2008, 19:19 by Bill Reiss | Comments (0) RSS comment feed |
      • Currently 0/5 Stars.
      • 1
      • 2
      • 3
      • 4
      • 5
      Filed under: