Developing a Casual Game with Siverlight 2 – Module 4
March 21, 2009 @ 8:32 am in Microsoft, Silverlight
This week Microsoft published the latest issue of the Expression Newsletter. If you have not seen the newsletter its a great series of articles focused on using Silverlight and the Expression tools to create amazing rich interactive solutions. In this latest issue I was asked to contribute the fourth of a six part series of articles on exploring the process of designing and building a casual online game in Silverlight 2.. Here is what the series will include.
- Module 1: Getting Started – Architecture / framework
- Module 2: Movement and collision detection
- Module 3: Design – Sprites, boards and dialogs
- Module 4: Animations and sound
- Module 5: Initialization and Deployment
- Module 6: Advanced concepts (Physics, Multiplayer, Optimization)
Make sure to check out the article at http://www.microsoft.com/expression/news-press/newsletter/
Code: Game.zip
Tagged as 

April 1st, 2009 at 2:35 pm
Hi Joel
Thanks for some great articles! I’m using them as inspiration for some prototyping I’m doing at the moment for a new Silverlight game I want to create.
I just noticed a bug in your Vector class, it’s the Normalize() that’s buggy :)
Your code is:
public void Normalize()
{
_x /= Length;
_y /= Length;
}
The problem is that you are using the Length property, whici will calculate the lenght every time based on the x and y. This result in the Length being two different values for the _x / = Lenght and _y /= Length, which again, results in a wrong normalized Vector.
The easy fix I did for this is:
public void Normalize()
{
double tempLength = Length;
_x /= tempLength;
_y /= tempLength;
}
Just wanted to share :)
//Mads Laumann