Compile your XNA 2D games to run in Silverlight with SilverSprite
In December, I released my Dr. Popper game on Xbox Live Community Games (XLCG) which allows you to sell your XNA based games on the Xbox 360. We also started work on Silver Arcade, a hosted game platform for Silverlight games.
So I started thinking more about how to make a game for both XNA and Silverlight. At first I thought about creating an abstraction layer on top of the two to provide a consistent way of writing games for both. The problem with this is that anyone else who wanted to use this framework would have to learn something new.
So instead I started to work on something ambitious, and really had no expectations up front that it would actually work. The idea was to create a way to compile your XNA 2D code and content into a Silverlight application. Even better would be if you didn't really have to change much or any code. This actually worked out better than I thought and gave rise to SilverSprite. SilverSprite is available as an open source project on CodePlex and the licensing should allow you to use it in any way you wish.
I released a new version this weekend that adds some new features. Here is a partial current list:
- Implements much of SpriteBatch, so many SpriteBatch games should be easy to get working
- Bitmap fonts are supported
- Compressed DXT textures are supported to reduce XAP size.
- Gamepad controls are mapped to keyboard
- Keyboard and mouse are supported
One thing I do ask is that if you port your XNA game to Silverlight, that you consider hosting it on Silver Arcade.