In our most recent Popfly update, we shipped the project I’ve been working on for the last couple months (along with Patrick Wong, Tim Rice and help from the rest of the team), which is a fully backwards compatible game engine, completely rewritten from browser based JavaScript rendering using Silverlight 1 to a C# based engine using Silverlight 2.  As noted elsewhere, the new engine is a heck of a lot faster than the old (both due to switching to a compiled language from an interpreted one, and due to many efficiency improvements), but the most impressive thing about the switch in my mind is the fact that it’s as fully backwards compatible as any incremental change we’ve made since the original release.  Think about it – the engine’s written in C#, but all the custom code is still in JavaScript. 

That is largely thanks to Patrick’s efforts.  In order to keep custom code working, what we did was take the current version of the Silverlight version of the DLR (the “Silverlight Dynamic Languages SDK”).  We did tweak the JavaScript implementation a bit to make code intended to work with the JavaScript Silverlight interfaces play nice with the managed interfaces, but overall, it was pretty much plug and play aside from all the hard work figuring out a largely undocumented piece of prerelease software :) (I think it’s on version 0.4.0 currently).  If you haven’t checked it out, the DLR is a pretty slick piece of technology – despite the fact we’re running a bunch of JavaScript code, it’s still miles and away faster than the old engine which ran on the browser’s JavaScript engine (although I’m sure efforts in IE8, Chrome and Firefox 3.1 will narrow the gap).

What does this mean for you?  If your a Popfly game creator, it means a much faster engine that is more consistent from browser to browser.  That means you can add more actors and other craziness to your games.  If your a software developer with a lot of code in Silverlight 1?  Well, for you I’d say it means you should feel free to move to C# and Silverlight 2.  It took me a couple months, largely on my own with about a month of help from Patrick to rewrite a large chunk of code that had been developed over the previous year or so by a team that grew from one to three (and occasionally more) devs.  The cost was larger than it might have been because I also used it as an opportunity to re-architect and clean up the game engine, and I had to maintain compatibility with a large and complex set of existing data (the thousands of games already on  I would expect that for most other Silverlight applications, the cost would be significantly less.  What I got out of the experience was the vastly superior tooling experience of C# and Silverlight 2, a huge perf boost by moving to a compiled language, the maintainability of C#, the chance to follow the computer science adage of "throw one away”, and a much better code browsing and IntelliSense experience (again due to the fact that C# is strongly typed and compiled).  My advice if your considering a similar move would be to take a look on what code you’re likely to touch again, and if you can see yourself working on it regularly, or if it has strong perf requirements take the leap. 

If you’d like to hear more about Silverlight 2, working with the DLR, the port, or the engine, let me know in the comments and I can go into more details on the areas that interest you.