开发者

When should I go for Silverlight and when XNA?

开发者 https://www.devze.com 2023-03-11 15:16 出处:网络
I don\'t have much knowledge about Windows Phone 7 development. I know there exist two paths for an app development. Silverlight or XNA. Before I start 开发者_如何学运维I would like to know for what s

I don't have much knowledge about Windows Phone 7 development. I know there exist two paths for an app development. Silverlight or XNA. Before I start 开发者_如何学运维I would like to know for what scenarios Silverlight is the best choice and for what kind of apps it makes more sense to use XNA?


Silverlight is designed around building applications. As such, it includes a retained graphics model (re-drawing is handled for you) and wide range of user interface elements including both interactive controls and controls that perform layout logic.

XNA is designed around building games. As such, it includes an immediate graphics model (you must draw every frame) and game-friendly features like a content pipeline for importing graphics and low level audio support.

There is nothing stopping you using Silverlight for games and XNA for applications, but unless you have a good reason for switching it around you'll find yourself fighting against the framework while trying to do simple things.

Neil Knight mentioned you can use mix them in Mango, though the mix involves using XNA in a Silverlight application and not the other way around.


Microsoft provided a handy chart just for this type of question :)

http://msdn.microsoft.com/en-us/library/ff402528(v=VS.92).aspx

Use Sliverlight if

  • You want a XAML-based, event-driven application framework.
  • You want rapid creation of a Rich Internet Application-style user interface.
  • You want to use Windows Phone controls.
  • You want to embed video inside your application.
  • You want to use an HTML web browser control.

Use XNA if

  • You want a high-performance game framework.
  • You want rapid creation of multi-screen 2D and 3D games.
  • You want to manage art assets such as models, meshes, sprites, textures, effects, terrains, or animations in the XNA Content Pipeline.

Combine Silverlight and XNA if

  • You want a XAML-based, event-driven application integrated with a high-performance game framework.
  • You want to create a multi-screen 2D or 3D game that incorporates a Rich Internet Application-style user interface.
  • You want to use Windows Phone controls along with art assets such as models, meshes, sprites, textures, effects, terrains, or animations in the XNA Content Pipeline.
  • You want to use Silverlight text rendering, including international text, instead of sprite fonts.
  • You want the page navigation model of a Silverlight application combined with the rich graphics power of an XNA Framework application.


Silverlight has a rich set of objects for building 2-d interfaces, especially 2-d interfaces composed of text, buttons, images. It's great for displaying data and taking in data.

XNA is meant for building out games or simulations, in particular 3-d, and gives you access to the device at a level somewhat closer to the hardware. XNA lacks the kind of objects that Silverlight does, but you get the flexibility to do more interesting things if you spend the time.

You may find this post useful further.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号