Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best design pattern for complex silverlight games

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.

like image 896
BenMaddox Avatar asked Sep 16 '26 18:09

BenMaddox


2 Answers

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.

like image 188
Bill Reiss Avatar answered Sep 18 '26 07:09

Bill Reiss


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.

like image 20
Shawn Wildermuth Avatar answered Sep 18 '26 08:09

Shawn Wildermuth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!