Building Xna 2.0 Games

 
September 19th, 2008 by John Sedlak

For a little while now I have been working with James Silva on a book, Building Xna 2.0 Games. The book is an incredibly fast paced guide to developing a game like The Dishwasher as the artist, sound engineer, programmer, tester, designer and much more. We cover topics like HLSL effects, particle systems, network programming, tool creation and scripting. Also covered are non-programming topics like creating some custom sounds, generating characters and how to make sure that you do not fail by keeping checks on your goals and designs.

So if you want to help us out and learn lots in the process, buy the book!

Thrust Diagnostics

 
September 16th, 2008 by John Sedlak

I am building in a host of diagnostic tools for the next release of Thrust to help you keep track of what is going on with your game. Currently I am working on a few ways to visualize how each gamepad is being used which is incredibly important on the Zune. Here is a screenshot of Galactic Defense using one to measure the left thumbstick:

GD and Diagnostics

And a video:
<a href="http://video.msn.com/video.aspx?vid=99fc531a-356b-4472-8f82-942dec70dd24" target="_new" title="Galactic Defense and Diagnostics">Video: Galactic Defense and Diagnostics</a>

How To: Take a Screen Capture of a Zune Game

 
September 16th, 2008 by John Sedlak

This one is incredibly simple.

  1. Connect Zune to computer.
  2. Deploy / Run a game.
  3. Open Device Center (in Start Menu)
  4. Right click on Zune and select Take Screen Capture

And there you go!

Galactic Defense

 
September 15th, 2008 by John Sedlak

I knew I couldn’t just let the work we did on Tower Defense just sit forever in some bin of old source code on my hard drive. So I have started porting it over to the Zune with some upgrades and some downgrades. Naturally there is no mouse on the device so I have been working mostly on the UI for tile selecting and placement. Here is a demo showing the work so far:

<a href="http://video.msn.com/video.aspx?vid=682f2a27-39db-426a-a156-7abb99482efc" target="_new" title="Galactic Defense Tile Placement ">Video: Galactic Defense Tile Placement </a>

I am working towards an alpha release within a week or two which will coincide nicely with a new release of FGF, which will contain the first release of Vodka.

Get Colored!

 
September 2nd, 2008 by John Sedlak

Implemented the start of color maps today…

Terrain Seams and HUD Tools

 
August 30th, 2008 by John Sedlak

One of the problems with developing a game for the Xbox 360 is the inability to know exactly what the safe zone is for the TV you are playing on. For that reason, I am including a HUD adjustment tool in the next release of FGF (Thrust). Here it is in action, a simple move of the left joystick will increase or decrease the amount (percentage) of width between the edge of the screen and the HUD. Each axis works independently since some TVs may be worse on one axis.

HUD Adjuster

You may also notice that in the above screenshot, there is a fairly obvious rip in the terrain! We cannot have this in a game, so I have gone ahead and implemented some simple seam fixing. Here is the result:

Seam Fixed

Seam Fixed - Wireframe

Key Manager 2.0

 
August 29th, 2008 by John Sedlak

Just a note that I haven’t forgotten about my goal to publish my applications for X86 and X64. Here is a screenshot of the latest build of Key Manager. I am rebuilding it in WPF and will support importing keys from the old version.

Key Manager

Restoring Application.LocalUserAppDataPath Functionality in .NET 3.5 / WPF

 
August 29th, 2008 by John Sedlak

With the arrival of .NET 3.5 and consequently WPF applications, Microsoft has done away with the old Application WinForms class. No longer can you call Application.LocalUserAppDataPath to get where the user’s files are stored. To restore this functionality as well as add a bit more, I have tapped into an uncommon resource: extension methods. Let’s dig a little deeper, shall we?

The first thing we need to do is be able to get the Company Name from the assembly. Inside of a blank static class, add the following functions. I have named my class ApplicationExtensions.

Fortunately the company name is kept in an attribute:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public static string GetCompanyName(this Assembly assembly)
{
    string name = string.Empty;
 
    object[] attributes = assembly.GetCustomAttributes(typeof(AssemblyCompanyAttribute), true);
 
    if (attributes != null && attributes.Length > 0)
    {
        AssemblyCompanyAttribute aca = attributes[0] as AssemblyCompanyAttribute;
 
        if (aca != null)
        {
            name = aca.Company;
        }
    }
 
    return name;
}

Note my lack of any formal error handling. I will leave this up to you to handle. For now, returning an empty string will do. Next up, we need to be able to format the version number:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public static string GetFormattedVersion(this Assembly assembly)
{
    string version = string.Empty;
 
    try{
        Version assemblyVersion = assembly.GetName().Version;
 
        version = string.Format("{0}.{1}.{2}.{3}",
            assemblyVersion.Major,
            assemblyVersion.Minor,
            assemblyVersion.Build,
            assemblyVersion.Revision);
    }
    catch{}
 
    return version;
}

And finally, the LocalUserDataPath:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public static string GetLocalUserAppDataPath(this Application application)
{
    string path = string.Empty;
 
    Assembly assembly = Assembly.GetEntryAssembly();
 
    if (assembly != null)
    {
        path = Path.Combine(
            Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
            Path.Combine(
                Path.Combine(
                    assembly.GetCompanyName(),
                    assembly.GetName().Name),
                assembly.GetFormattedVersion()
                )
            );
    }
 
    return path;
}

Application: Folder Kill v1.0 for X86 / X64

 
August 21st, 2008 by John Sedlak

Here is the first of many applications, Folder Kill. You can currently download the source code or the binary itself for each platform. Setup files will be included with the next release. Warning: Folder Kill makes absolutely NO attempt to ask you about deleting folders. It just deletes them based on start folder and provided patterns. Please split patterns with a comma. For example: “svn,bin,obj” will remove all svn, bin and obj folders.

Folder Kill
Downloads

X86 / X64 Applications To Be Released

 
August 21st, 2008 by John Sedlak

Now that I have Vista X64 installed and running, I plan to redevelop my Applications and publish them for both X86 and X64 installs of Windows. Among these include NetFlix Viewer, Key Manager, Cyclometer and Folder Kill. I plan to release Folder Kill, Key Manager and NetFlix Viewer this weekend.