Thursday, June 22, 2006

The Jupiter Engine

     Till this moment, I still think Jupiter's structure is kinda strange. Comparing to a software mid-ware, it seems more like a software product framework.
     It uses server/client model, actually it seems good at supporting multiplayer RPG game. I'm impressed by its directly creating multi-play configuration. But the problem is, it doesn't have a clear file management system, at least, it doesn't explain clear in its documents.
     So till now I still feel hard to find the place it load the configuration file, the attributes file.
     And a more strange thing is Jupiter has a object.lto file, which actually is a .dll file for defining objects in game world. This file is supposed to be created by the programmmer, and then will be used in the tool DEdit. Without this file, the DEdit tool is meaningless.
     About DEdit tool, it makes me think about XNA, but the biggest diffculty I met is that all these settings are embeded into the Jupiter Engine's framework without a clear scripting system. So if there is an accident happened, I have to check both the code and the design tool.
     I really think a transparent scrpting layer between the design tool and game code is important. Without it, the programmers can't get a clear view of the project they are making, and actually, feel burdensome.

Monday, June 05, 2006

DirectSound Notes

1 Main Component in DirectSound
1.1 DirectSound
* needs to include Dsound.h
* Supports *.wav file only
1.2 DirectMusic
* needs to include Dmusici.h
* Supports *.wav file and MIDI file and a little bit other extensive functions.

2 Configuration
Device( unique per app )
|
Primary Buffer( unique per app )
|                  |...
Secondary     Secondary ...
Buffer           Buffer ...
|                   |...
Effect            Effect ...
The properties need be set:
* Coperative Level--for several application which may access the device at the same time...must be set**

3. Streaming related

Play cursor -- GetCurrentPos, SetCurrentPos
Write cursor -- need be controlled carefully.
* write cursor is always supposed to be ahead of play cursor.
Play Buff Notification -- notified when play cursor reaches certain point in a buffer.

4. Nouns
* Sound rolloff -- As a sound source moves away form listener, its perceived volumn decreases at a fixed rate.
* HRTF --Head-related transfer function.

5. References
DirectX SDK April, 2006

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