Delta Engine Blog

All about multiplatform and game development goes online

I have put together a little website for the XNA Racing Game Starter Kit released yesterday on

Here you go:

A little rant about the XNA Racing Game Starter Kit download: The download file is 130 MB in size and will eat up almost 290 MB of your hard disk space extracted. It is also only available in the .vsi format and can't be used in anything but XNA Game Studio Express or Visual C# Express. The main reason for this incredible size is the Textures directory, with uses mainly uncompressed .TGA files. The original Racing Game version had only about 50-70 MB in total with DDS textures and the Simple Racing Game version from my book is even smaller (30 MB I think, but a lot of content is not in there, its a also a much smaller and simplified project).

Microsoft has also removed all credits of me, all readmes, all unit tests, most comments, some screens like the credit screens. It's a little bit sad for me because all references to me or my website were removed and I'm not even mentioned on the starter kit download page :( I think the starter kit is now much harder to understand because there are no unit tests in the code to test anything out. Anyway, I just hope the XNA Racing Game Starter Kit is useful for you guys, it helps XNA and everyone wins :-)

Update 2007-05-01: I'm now mentioned on and happy :)

XNA Racing Game downloads now available on

Nice one. The Racing Game Starter kit for XNA Game Studio Express I made last year is now available on

More information will be available shortly on the in-official website for the Racing Game (link to the xna creators club, screenshots, mod support and forums later):

Enjoy the Racing Game ;-)

My book Professional XNA Game Programming for the Xbox 360 and Windows seems to be out too. I have not received a copy myself yet, but I received some emails about other guys already holding it in their hands ^^ If you try to download the source code for the book from the Wrox website and encounter problems, please be aware that the download link is currently pointing to an older version, which still has some issues. I will try to sort that out as soon as possible. The official release date was 11 May, 2007, but Amazon says it is already available, while their own release date is stated as 30 April, 2007. Confusing, isn't it?

If you find any issues with the starter kit or the book download please write me a message so I can fix it as soon as possible. Many thanks to ZMan (Andy Dunn) for an early bug report.

Quo Vadis Conference 2007 Photos

Here are some pics from the Quo Vadis Conference 2007 in Berlin (from last weekend).

This is what the Quo Vadis is about, everything and nothing.

Entering Berlin, bigger roads and bigger houses, other than that not much different than Hannover except for its huge size (in Germany we do not have any big cities except for Berlin).

The "Siegessaeule". Dunno whats that is in English, probably Victory Column, doesn't make much sense, does it?

The Brandenburger Tor .. maybe it would be better if I write this blog entry in German.

And the big TV tower in the middle of the city with a rotating restaurant in the middle.

Finally at the Quo Vadis Conference itself. A lot of people are already here, a lot of familar faces, but not many developers from our region for some strange reason, but all the big guys were there.

The game design lecture about Crysis. It was actually quite nice and the Nanosuit looks like a very polished feature. Hopefully the game design will not suck as much as in FarCry for the second half of the levels.

You really had to concentrate hard in order to get Wifi working. With that many people logging onto the same hotspot, it was not very likely that you get any download through in the middle of the day. In the morning and evening the Wifi Lan was pretty fast and useable.

One of the few technical lectures. This is Intel's Core 2 Duo lecture, which was quite technical with a lot of assembler code and internal tricks. It was very informative.

This is the room I was speaking in. It was a little workshop about XNA and I showed some games and showed how to work with XNA Studio Express.

A little bit of the Racing Game.

And here a bit of the Dungeon Quest game I did last month on the GDC in 4 days. Little dark on a projector in the middle of the day.

And some other games. There was also someone trying out XNA as I was speaking. There was not much interaction with the audience because most people had no questions, but I talked my way through it and I heard some positive feedback about XNA later.

Me in Terminator mode at night when we went to the Quo Vadis Party per train. Maybe my cell phone is as explosive as the one from Terminator 3 ^^

At the Party it was loud and hard to speak, but we met a lot of nice people and the usual suspects. Its always good to know what everyone else is doing because most developers you just meet on such events.

And that's it for this years Quo Vadis, 3 days of lectures and workshops, which turned out to be better than we thought. Especially on day 3 the project management workshops were really interesting.

Quo Vadis Conference 2007 (

The next 3 days I will be on the german Quo Vadis conference and I will speak a lot about XNA together with my good old Microsoft friend Dirk Primbs. You can find us every day from 14 to 18 o'clock at the "Seminar 10 - Ufo" Room where we will do the Workshop "Hands on XNA". More information can be found in the program on the official Quo Vadis site:

If you are there too and want to meet with me, drop me an email or use the meeting form on the website there. Or just come by. I will also show all the latest projects I have done so far with XNA and .NET, hopefully this attracks more people to XNA, which means more people can buy my book ;-)

How to allow web services to be called and tested remotely

My blog posts are getting shorter ^^

Usually you can't execute web service methods from the autogenerated web service site remotely to test them. By default you will get the following message where the web service test is supposed to be:
  • The test form is only available for requests from the local machine
Fix this by adding the following to your web.config file of your web service:

                <add name="HttpGet"/>
                <add name="HttpPost"/>

BTW: Any messages in the Test section of the web service site will be "The test form is only available for requests from the local machine" even if the problem is something else, which you will see when testing locally like "The test form is only available for methods with primitive types as parameters.". There seem to be no way around that.

Unit testing for web sites

Just found this by accident: NUnitAsp. Seems to be very useful. I was always wondering why TestDriven.NET does not support testing web sites or services. It gives you the following message if you try to run tests from a website:
  • Can't execute tests in 'Web Site' application.
There are probably other reasons why this does not work yet, but maybe it is possible to find a way around that. Currently I use a extra project and call the web site or web service from there with my custom methods. It looks much cleaner with NUnitAsp. For me it would even be better if I could write and run unit tests directly on the website without that extra project. Maybe I should drop Jamie Cansdale of TestDriven.NET a short message asking him for some support in the future for ASP.NET. There does not seem to be anything on his blog about ASP.NET yet, at least the search returned 0 results.

Here is a little example from NUnitAsp, which shows you how to test a label on a website:

public void TestExample()
  // First, instantiate "Tester" objects:
  LabelTester label = new LabelTester("textLabel", CurrentWebForm);
  LinkButtonTester link = new LinkButtonTester("linkButton", CurrentWebForm);

  // Second, visit the page being tested:

  // Third, use tester objects to test the page:
  AssertEquals("Not clicked.", label.Text);
  AssertEquals("Clicked once.", label.Text);
  AssertEquals("Clicked twice.", label.Text);

Reusing ascx web controls

After developing and testing some ascx web controls in the past I was woundering why I have to copy them over to a new web project today instead of just referencing them. When you write a normal windows application and then want to reuse some library parts in another project (or if you just want to structurize your app a little bit better) you would obviously use a dll library for the job to share functionality.

Not that easy with web controls. My first thought was just to copy the .ascx and .ascx.cs files over to a new dll project and start compiling. After adding the missing images and scripts the following thing happend:

Well, the code does compile on a website, but in a dll project it will not build the ascx code for you and merge the controls defined there with your .cs file. If you do not define controls or do any visual stuff you can probably just use WebControls instead of UserControls, but you still have to implement the Render method yourself and you just do not have any design support. More information about creating server controls can be found here.

While that solution is probably the cleanest one and has the advantage of hidding the source code and make it easy to just drag and drop controls on your page, it is the hardest to develop. And I already have my .ascx controls working, I just want them in another project without copying them over again and again.

I searched for a while on the web for some solutions, see below for all the links. The best solution for me was the one from ScottGu, which just uses a normal website and then uses a post build copy to get all the files into your current website project. The controls dummy website can then be used all over the place, you just have to add the copy command to each website that should use your controls. This solution might not be the best, so if you have more complex problems, check out the links below.

No reason to repeat all the stuff ScottGu has already written, check out his great article here or here.

BTW: I use this just for simpler web controls or when I have something that needs to be duplicated on some pages. For Ajax controls on the other hand I got a project similar to the AjaxControlToolkit, but there you live without design time editors anyway.


Annoying Files Remover Tool (6.1 KB)

Recently I had to remove a lot of .svn and Thumbs.db files from certain directories because I wanted to move them or someone else had created thumb files (which is really annoying). After deleteing those files by hand a couple of times I decided it would be better to have some tool doing that for me. That should be easy to do, shouldn't it?

I started by opening VS Orcas and coding for a while, but for some reason the commenter plugin for CodeRush was not working anymore, which already annoyed me. Then the Intellisense crashed several times, but VS Orcas did not close, which was a nice feature. But without CodeRush it was a little bit annoying to generate all that code by hand and then to write all the comments also by hand. I removed the LINQ test code I used to go through all directories and added some foreach loops (just 2 lines more, how cares) and went back to VS 2005 for this project.

The next big problem was the removal of read-only files and directories, which is just not allowed in the .NET framework, you will get the following exception:

System.UnauthorizedAccessException occurred
  Message="Der Zugriff auf den Pfad entries wurde verweigert."
       bei System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive)
       bei System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive)
       bei System.IO.Directory.Delete(String path, Boolean recursive)
       bei AnnoyingFilesRemover.RemoverForm.SafeDeleteDirectory(String directory) in C:\code\Communities\AnnoyingFilesRemover\RemoverForm.cs:Zeile 153.

The MSDN help for Directory.Delete gives you the explanation that this happens because you are trying to delete a read-only file.

   UnauthorizedAccessException: The caller does not have the required permission.

This is only half the story because if you look in File.Delete you see a more detailed error explanation:

    UnauthorizedAccessException: The caller does not have the required permission.

    -or- path is a directory.

    -or- path specified a read-only file.

And the directory I wanted to delete was ".svn", which is read-only and hidden. An easy way around that is to change the directory attributes. But that won't help if there are still files in the directory because you will still get the same error. Instead you have to replace all the file attribute for all sub directories and files too. I wrote the following method to do that.

#region RemoveAllAttributes
/// <summary>
/// Helper to remove all file and sub directory readonly attributes
/// to make SafeDeleteDirectory work!
/// </summary>
/// <param name="directory">Directory to change (will be deleted later
/// anyway)</param>
private static void RemoveAllAttributes(string directory)
    // Get all files and sub directories.
    string[] files = Directory.GetFiles(directory);
    string[] directories = Directory.GetDirectories(directory);

    // Kill all attributes, make files normal and directories just directories
    foreach (string file in files)
        File.SetAttributes(file, FileAttributes.Normal);
    foreach (string dir in directories)

    // Finally set the main directory to a normal directory!
    File.SetAttributes(directory, FileAttributes.Directory);
} // RemoveAllAttributes(directory)

The rest of the tool is easy to understand and there is nothing special about this tool except that I find it very useful right now. It is also very fast, I let it run over 20 000 files and it was done immediately and had deleted several hundert files in the process. Again: Be careful what you type in the filters textbox and save important directories before messing with them.

As always, here is the download and source code (both in .NET 2.0 since I have removed all LINQ features that were not important for this project anyway):

SearchDotNet, a new search site just for .NET Developers

I just heard this on the DotNetRocks podcast, where Dan Appleman talks about Discoverability with Carl and Richard. He uses Google Custom Search to create (which was created in one day) and the idea is really cool.

You as a .NET developer will only get useful handpicked urls as search results and not any spam or meaningless sites. Dan seems to check every site himself and currently most MSDN blogs and sites are linked in there (as well as MVPs as he tells us on the show, but I could not find direct links to my blog yet).

Anyway, great idea, hopefully it will not die in a few weeks. Google Custom Search looks kinda cool too, have to check that out some time in the future.

ASP.NET Ajax Template support in Visual Studio Orcas

Yeah, blogging every 5 minutes. I'm really trying to blog more again, let's see how this works out.

Ok, here is there problem: Visual Studio Orcas (March CTP) does support ASP.NET web projects and you can even load and use previously created ASP.NET Ajax projects, but you can't create new projects because the Ajax templates are missing!

The solution: Just point the user projects templates directory to your old VS 2005 project templates directory (or copy the templates over to your user projects template directory) like in the following picture. Make you you have ASP.NET Ajax installed and working in your VS 2005 installation.

Path to set:

    C:\Program files\Microsoft Visual Studio 8\Common7\IDE\ProjectTemplates\Web\CSharp\

Btw: The new path in VS Orcas is:

    C:\Program files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\CSharp\Web\

But just copying the files over there will not do it because VS 9.0 will still use the cached templates, which are not updated automatically when you change something there. Just point to the VS 8 template files, that is much easier:

Now you can create new ASP.NET Ajax projects in Visual Studio Orcas with File -> New -> Web Site: