Datasheet
away. Most big game studios also can’t just adopt every new technology right away. The studio might
be in the middle of a big project and also might have a very big code base, which is not easy to port. In
the long run, however, code will get converted and we will move up the ladder of high-level languages.
Figure 1-15 is an old picture I did to show the differences between DirectX with C++ and Managed
DirectX in C#. As you can see, MDX code can be half the size of unmanaged code. For XNA, the code
would even be shorter and it gets much easier to load textures and show them on the screen, but the
comparison to MDX gets harder because the concepts are different.
Figure 1-15
Getting Used to the Content Pipeline
As you saw earlier with your first XNA project, it is quite easy to just drag and drop a texture into your
game project inside XNA Studio. Although it is nice to have all your game content in one place and side
by side with the code, there are a couple of things you have to remember. Most of the projects I have seen
throughout my career have not put the textures, models, or shaders directly in the Visual Studio project.
The reason for that is that it is much easier to just copy a few files over and then let the game load them
directly. By default, Visual Studio will also not copy any content files to your output directory; you have
to change the Build Action from
None to Content and set the Copy to Output Directory setting to Copy
if newer
. This is quite a hassle and XNA makes it a little easier.
C
++
c#
23
Chapter 1: Introducing XNA
61286c01.qxd:WroxPro 1/21/08 3:44 PM Page 23