Silverlight 4 Improvements for Gaming

Nov 18, 2009

Yes! Silverlight 4 Beta is here! And it comes with quite a few improvements, mostly LOB, but there are some cool things for game developers as well!

The full list of Silverlight 4 features is here. Also check - the keynote at 1:47:09, showing a cool Facebook app (1:47:56).

Here is a quick overview of some of the new features that I think will improve gaming in Silverlght 4:


Silverlight 4 has better performance than Silverlight 3. I think that says it all :) The keynote at PDC says "2 times faster".

Full Keyboard Access in Full Screen

Yes! Finally we can have a fullscreen Silverlight game have all cool controls, potions, and whatever else you may want to use the keyboard for.

This feature requires trusted application, so the user will get a security prompt when you try to activate it from within your code.

Right-Click Mouse Events

Another great feature for games that are mostly mouse controlled. For example, right-click and drag can be used to rotate the screen (like in Heroes in Might and Magic 5) or fire a missile.

Video and Sample Code: Right-click Mouse Events

Mouse Wheel Events

Good for supercharding a car engine, or just plain navigating an interface :) You could do this with some code behind in Silverlight 3, but it's much nicer now. Also you'll notice that scrolling controls like list boxes can now be scrolled with the wheel by default.

Video and Sample Code: Handling MouseWheel Events

COM Interoperability

I'm still investigating here - what COM objects are available? How to use DirectX effects, etc. For example, using DXImageTransform...

This feature requires trusted app, so your fellow gamer will get a security prompt.

Video and Sample Code: COM Object Access in Trusted Applications

Bi-directional and complext text, Right-to-left support in controls

This feature can help you make your game read better for more people, if needed.

Video and Sample Code: BiDi and Right-to-left Support

Fluid user interface support

What this means is that instead of having to do weird "hacks" in code to transition between your images (like I did in Shock's backgrounds), you can now hook up to more events that will make your life easier and your game look more "fluid" (think "cooler" :)). Those are BeforeLoaded, Loaded and Unloaded states for ItemsControl

There are many more features coming up in Silverlight 4 (, but I believe the ones above are more important for gaming scenarios.

What is your opinion and/or favourite feature?

Please comment


blog comments powered by Disqus | Terms | Log in


About the author

Happy & enjoying life. Software enthusiast.
The opinions I express here and on are mine and not my employeer's (Microsoft).
This is the official blog of You can find Silverlight samples, coding stuff, and hopefully other interesting things here.