您的位置:首页 > 其它

XNA Game Studio or Silverlight: Which Product is Right for Me?

2011-02-17 14:23 453 查看
The first question many developers will face after deciding to develop a game
for Windows Phone 7, is which of the two game development models they should
choose. Developers can choose to develop their game using either the XNA
Framework or Silverlight. This article will help developers make an informed
decision when choosing between the two.

Choosing between Silverlight and
XNA Game Studio isn’t quite as straightforward as looking at a feature list or
performance metrics. Each framework was designed with different goals and
customers in mind. There are, as a consequence, very few hard and fast rules
about which framework you must use. Instead, we will offer guidance on which
framework you would be more successful or productive using. Ultimately, the
choice is dependent on what works best for you, and for your game.

Who should consider using
Silverlight?

If you are building a Windows Phone companion
application to your existing Xbox 360 or PC game, and plan to show primarily
statistics and other information
, then Silverlight is a great choice for your
game. Silverlight gives developers the ability to leverage the built-in UI
controls on the phone. Those controls can be used right out of the box, and will
match the look and feel of Windows Phone elements, with no customization on your
part. An XNA Game Studio developer that wanted to have controls matching the
look and feel of Windows Phone would need to build and maintain those controls
for themselves.

If video is a key element of your game, and you want the
ability to show video in a portion of your screen (as opposed to full screen),
then Silverlight is required. Silverlight allows you to use the media control to
composite your video directly into a portion of your application. XNA Game
Studio games, on the other hand, must show video full screen, and cannot
composite that video.

Similarly, Silverlight is required if your game is
going to be displaying web pages via the built-in Internet Explorer (IE)
control. Silverlight applications have the ability to host the IE control, and
composite that control into their UI. XNA Game Studio games can use http(s), but
cannot use the IE control
.

If your application requires keyboard support,
then you should consider Silverlight. Silverlight applications get access to the
software keyboard by default. XNA Game Studio games would need to build their
own software keyboard control
in order to require keyboard input. Both
Silverlight and XNA Game Studio can take advantage of hardware keyboards, when
they are present. Windows Phone 7 offers hardware keyboards as an option. Not
all devices will have a hardware keyboard.

If your development
background contains experience working with other web technologies, then
Silverlight will offer a shorter ramp-up time. If you are porting an existing
game
, for instance, the porting process will most likely take less time if you
target Silverlight instead of XNA Game Studio.

Who should consider using XNA Game
Studio?

If you are more comfortable with the standard
Update/Render loop for developing your games
, then XNA Game Studio is the choice
for you. If you are coming from Xbox 360 or PC game development, then XNA Game
Studio’s application model will feel more comfortable to you. XNA Game Studio
was built by game developers, for game development. As such, all of the
constructs in the framework are designed specifically to produce
games.

If you are building a true 3D game, then XNA Game Studio is
required. Silverlight on Windows Phone can simulate 3D by rendering to 2D
sprites ahead of time, and prebaking animations. XNA Game Studio has full 3D
support, including support for skinned animations.

XNA Game Studio games
gain access to XNA Content Pipeline projects, which allow build-time processing
of asset
s. Silverlight doesn’t have an analogous technology. A Silverlight
developer would need to write their own pipeline from scratch in order to have
the same functionality.

XNA Game Studio games get access to a library of
hardware accelerated vertex and pixel shaders on Windows Phone 7. Silverlight
does not have access to shaders on Windows Phone 7 devices. XNA Game Studio
applications gain control over the video card’s state
, allowing those developers
to set render states to their liking. This includes states such as alpha
blending, wireframe or solid, etc. The driver for Windows Phone 7 is a Direct3D
implementation, and is similar in functionality to the desktop
Direct3D.

If your games make heavy use of sprites, or animates more than
a handful of sprites on screen, your title will likely be more efficient with
XNA Game Studio. Silverlight performs most of its rasterization and composition
on the CPU, while XNA Game Studio makes heavy use of the graphics hardware.
Expressed another way, if parts of your scene is going to change every frame,
then XNA Game Studio is for you.

Windows Phone 7 devices have a screen
that is 800x480 pixels. That is a lot of pixels! Many games will run into fill
rate issues if they have any overdraw at all. XNA Game Studio games can access a
high-quality hardware scaler
, which will allow game developers to render to a
much smaller target, and have that render scaled (for free) via dedicated
hardware, to the device’s native resolution. If you want to enable
post-processing
, or if you expect that you might have some overdraw, then XNA
Framework is likely for you.

More Information

For
additional Information on developing a game for XNA Game Studio, check out
our Education
Roadmap page.

Educational content for Silverlight and XNA Game Studio
development for Windows Phone 7 can be found in the Education Catalog.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐