Silverlight 5 and SilverSprite

Coordinator
Apr 14, 2011 at 12:53 AM

At the MIX conference today, Microsoft released a beta of Silverlight 5. Some people have referred to Silverlight 5 as the gaming release, and I agree. With the tools at your disposal in Silverlight 5 you can create games that rival games on any other platform, web based or not. In what has been a common occurrence, the Silverlight team has implemented enough to remove major roadblocks but is relying on the community to build on top of this and fill in the gaps.

Silverlight 5's 3D API is an implementation of the very lowest level of the XNA 3D API. Even the namespaces are the same. There is a new control called a DrawingSurface which hosts the XNA GraphicsDevice and it has a Draw method that gets called on an interval like the XNA game loop. There are a few demos popping up already with some really cool things you can do with 3D. You may or may not know that XNA's 2D support is just rendering 2D objects in 3D. These objects are called textured quads, or basically rectangles with a texture mapping.

I have implemented a quick demo of using the new Silverlight 5 DrawingSurface to render 2D sprites:

http://blogs.silverarcade.com/silverlight-games-101/13/silverlight-silverlight-5-takes-2d-silverlight-game-development-to-the-next-level/

I'm confident that I'll be able to roll this into SilverSprite providing a complete and highly performant SpriteBatch. The one thing missing from the Silverlight 5 beta that I need is render targets, but these are supposed to be there before Silverlight 5 is released.

Along with graphics, Silverlight 5 also has the XNA SoundEffect class. Sound effects were probably the second most problematic thing behind graphics performance, so I was excited to see this.

If you're interested in 3D in Silverlight check out Balder here http://balder.codeplex.com/

Maybe at some point we can look at using Balder or something similar to add 3D support to SilverSprite too, but there are no immediate plans.

Finally, if you have a 2D game in XNA that you've had trouble getting working with SilverSprite and you're willing to share source code with me, let me know. I'd love to have a real world test case when migrating to Silverlight 5. 

  

Apr 14, 2011 at 7:41 PM

Hi Bill,

This is really great news.  I appreciate all the effort you put into the creative workarounds for Silversprite's previous limitations, and to learn that there are some potential performance improvements down the line is very exciting.  With luck RenderTargets will be in the mix too, but at least we have the useful Writeablebitmap implementation to fall back on.

Apr 18, 2011 at 6:40 PM

Hi Bill,

Thank you for your work.

I prepare 2 games on SilverSprite. Not bad. But performance is still not enough.
My result:
I am sorry for bad English.

 

Apr 20, 2011 at 8:34 AM

Hey Bill,

Those are great news! I'm impatiently waiting for the next release! Silversprite is a great library, but the performance was not so good for serious games. Now with SL5 that can be changed.

Thank you again for your hard work!

May 31, 2011 at 9:17 AM

Hi Bill,

The prototype looks great! And very promising indeed.

I looked it over and I think I more or less understand the idea of how the texture2D is applied (although shaders are not really my domain) but I'm unsure how I would extend this to easily draw multiple sprites with different textures.

How hard would it be to extend this example to include a Draw function which takes a Texture2d and a vector2 like in regular XNA?

Would be so nice if someone could help me out on this, then I can finally settle on a set of technologies to use (XNA just can't offer the rich GUI I'm looking for).

 

Thanks Bill for all the work you've done in the past.

Jun 16, 2012 at 2:03 AM

Dude Please tell me how u released the game to the web pretty Please I'm stuck