views:

673

answers:

2

What patterns do you think are best for silverlight games? Some main areas of focus are game performance, maximum number of objects reasonably updated in real time, ease of development and testing.

+2  A: 

For ease of dev and testing, applying the MVVM pattern (which is widely used in the WPF community) will be of great help. But as for the the other pieces, I would read Bill Reiss' blog (http://www.bluerosegames.com/silverlightbrasstacks/) as he has done a lot in that area.

Shawn Wildermuth
+2  A: 

Actually the blog Shawn mentioned should be http://www.bluerosegames.com/silverlight-games-101/

I've been fighting this one for a while, and in XNA games I am leaning towards a Model-View pattern but in Silverlight I like using a combination of inheritance and composition that I detail here:

http://www.bluerosegames.com/silverlight-games-101/post/An-improved-Silverlight-Sprite-class.aspx

It just seemed that when I went to implement a Model-View pattern in Silverlight for games that it got in the way more than it helped. It could also be that I just don't understand the pattern well enough and I'd love to see if someone who's better at it to see if what I do is applicable to that pattern.

Bill Reiss