Friday, June 02, 2006

XNA Build

    These words are subjective, and may not be totally right, but I think it’s better than copying and pasting the manual document.

1. What XNA can do for us?

    Generally, we can say XNA build is a build automation tool.
Recalling the building pipeline of a software piece, we compile our codes, copy them to the Bin folder, packing/converting all the resource files, make the file structures (folders), and copy resources to the folders they were designed to be.
Then we may use InstallShield to make an installer, that’s another story.

    However the building process has been tedious enough, especially for game assets, which may contain thousands of textures and models. It helps to make a checklist for the building process. But maintaining such a checklist is still hard.

    Actually by using MsBuild we can make this checklist by XML and finish all the jobs in this checklist automatically. By coding a .proj file in XML, the build process can be divided into sequential targets, such as build code, packing files, copy, clean etc. And these targets will be achieved by running msbuild command with the .proj file as input. (Thinking about MakeFile of gcc project)

    And now, XNA Build supports users a graphical environment for defining this building pipelines.

2. What is MsBuild?

    MSBuild is an application of XML and has .NET extensibility points. The idea was that you would describe what you wanted done in an XML file, and then the MSBuild program would run along, read that XML file and map the elements and attributes to .NET code that knew how to interpret them – consequently the principal extensibility mechanism for MsBuild was writing .NET.

    For using MsBuild, the .Net Framework SDK 2.0 is needed.

3. The Relationship between XNA Build and MSBuild

    XNA Build is built on top of MSBuild. MSBuild ships with a number of build tasks that provide basic build functionality (messages, copying files, and so on). XNA Build extends this functionality with a new set of tasks geared around scenarios for game studios.

4. XNA Features Functionalities( Tasks)

    Incrementally build can be achieved through DependencyAnalysis Task in XNA Build. This task analysis on the specified group of dependency logs and returns the list of files that need to be rebuilt.

    The XnaExec Task responds to generate the dependency logs. And it is also useful for invoking an existing command-line tool during a build.

    Another important Task is writeRelativeLinesToFile Task, which is useful for writing the paths of an asset group to a separate text file. And these text file might be important input data for command-line tools used in XnaExec Task.

5. Personal Opinion for Current XNA Build Release

    The current XNA Build Designer release contains a prototype visual design experience for XNA Build. And XNA also contains an Asset Relationship Management (ARM) system which is based on the concept managing assets and annotation data for each asset. But till now, it is still an API, if we want to display each arm file of assets in the XNA studio, we have to program plug-ins both on the design tools side and the XNA build side.

    Actually XNA Build generates a .xnaproj file automatically, but comparing to a .proj file for MsBuild, its graphical annotations reduces the readability drastically. And I suspect the feasibility to maintain the project totally through the GUI, just like the resource editor in Visual Studio, most of the time we prefer to edit the script manually.

    And since we don’t know when the final release can come out, it seems a more feasible way to use MsBuild directly.

6. References

http://www.microsoft.com/xna/
http://msdn2.microsoft.com/en-us/library/wea2sca5(VS.80).aspx
XNA Build Document
MechCommander 2 Sample
Mitch Denny's Blog : http://notgartner.com/posts/1573.aspx

0 Comments:

Post a Comment

<< Home