Andy's observations as he continues to attempt to know all that is .NET...

Sunday, May 18, 2008

Classic Snake in Silverlight 2

Inspired by Dave Wheeler's article in VSJ magazine, I decided it was time to write a simple game in Silverlight 2.  The game I chose was the classic game of Snake.

Whilst there is no doubt Silverlight 2 is a massive step closer to a .NET environment in the browser, there are still a few bits and pieces that trip you up.  Some of the collections data structures are not supported, LinkedList, Queue, Stack...there has been an underlying effort to keep the install of the platform as small as possible, so classes that have functionality that can be easily written using other classes have been tossed out.

As for WPF feature parity things have massively improved since we now have controls, not just simple shapes.  There is also now support for data binding and resources.  Things still trip you up though, transforms don't support data binding and results in less than obvious errors.

 

You can play the game  here and download the source from here

2 comments:

Dileep.M said...

It's looking interesting

but reposne from the server is '404'.

Andy Clymer said...

Sorry about that...Changed my web site and didn't build redirect links, my bad..

http://www.beaconsoft.co.uk

And click on the Games link

About Me

My photo
Im a freelance consultant for .NET based technology. My last real job, was at Cisco System were I was a lead architect for Cisco's identity solutions. I arrived at Cisco via aquisition and prior to that worked in small startups. The startup culture is what appeals to me, and thats why I finally left Cisco after seven years.....I now filll my time through a combination of consultancy and teaching for Developmentor...and working on insane startups that nobody with an ounce of sense would look twice at...