Sunday, December 27, 2009

Creating an installer for my XNA game + Prerequisites


Recently, I was looking into the possibilities I had for packaging my game (read more here). The first option I tried was the so called ClickOnce installer that is integrated in Visual Studio 2008. It turned out to be a bad choice for my particular needs; I don't need a java webstart clone, just a regular MSI installer package.

So I began my search for an install creator on the internet. Very soon, I stumbled upon Advanced Installer, which looked decent at first sight. It uses a reasonable licensing model; You have to pay for advanced features, but the basic use is free. I don't need advanced features, so I gave it a shot. And it turned out to be pretty good.

A particullary nice feature of this install creator is the nice prerequisites management screen. I defined the system requirements for my game there:
  • Windows version: XP or later
  • .NET Framework 3.5
  • DirectX 9.0c
  • XNA Framework 3.1
  • 1024 x 768 minimal screen resolution

The installer will check automatically if all prerequisites are present, and shows a warning if they don't. This is great, but not perfect (see next section). The result is a nice Setup.msi ready to spread around. I still need to test the install on a lot of different configurations though, but I'm quite confident that it will work.

System requirements

Some more on the system requirements: I think they are very reasonable in general, but two problems arise:
  • .NET Framework 3.5. I know for a fact that not every user has this installed, although it comes with windows updates if I recall. Yet, it is a large download and a requirement I can't drop.
  • XNA Framework 3.1: It's required to run games created with XNA gamestudio. I'm pretty sure no living soul has this installed, but it's a very tiny download.
I have not yet found a way to make the installer download these dependencies automatically. Including them in the package is not an option either. So most likely, the final download page for my game will include two old-fashioned download links. Sad but true.

This makes it obvious why most casual games are created in flash. All a player has to do is navigate to the webpage, wait 5 seconds for the game to load and play. And probably 99,99% of all people has flash installed.Too bad I'm a C# programmer, not an actionscripter...

Another platform I could have used is Microsoft Silverlight. Silverlight has the advantages of flash, and allows me to use C#. I seriously considered using Silverlight when I started this project... But the DirectX features you get with XNA are just... They make you feel like you're actually developing a game (with decent GPU support), instead of trying to turn a business application or browser plugin into something that looks like a game :-).

So that's the way it will be. Anyway, considering the amount of promotion/spam we'll throw at it, I don't expect that it will be too hard to find 100 "test subjects" willing to try it out. Let's just hope these system requirements are not too annoying. Anyway, I'd love to get some feedback on this one...
  • Do you have Microsoft .NET Framework 3.5 installed? (you can check this in "add or remove programs")
  • Is it too much to ask from a potential player to install the XNA Framework, or even the .NET framework in some cases?
  • Finally, if you are a software developer: Any experiences with 'advanced installer'? Any other install creators I should check out?


  1. Hello,

    The .Net Framework 3.5 is installed on every computer I own, I even have the XNA 3.0 framework installed. However, you should find a way to integrate XNA and the .Net Framework automatically in your download, because most of the times, user are dumb enough and won't read the prerequisites. They'll just say "This game is shit, it doesn't work on my computer".

  2. I think you're right, many users will not do the extra effort...
    So I'll keep looking until I found a way to integrate everything, and post it here on my blog.

    A friend of mine suggested that I'd have another look at a visual studio feature: the 'setup project' ( So I'll try that first.

    Thanks for the feedback!

  3. Hi Bram,
    I've had the same problem. It's a big shame GameStudio doesn't supply an installer creation tool.
    I used NSIS, because the engine I made my game in (FlatRedBall) supplies a script for it. It ain't perfect, but it does download and install the prerequisites. You can use it even if you don't use this engine.

    Here's a link:

    Some minor problems with the script I encountered;
    - It doesnt create an uninstaller for your game
    - The check for XNA3.1 doesn't work, so the user is always told to install it.

    Good luck

  4. Thanks for the hint! I'll have a look at the NSIS installer.
    I read some good things about the FlatRedBall engine... Checking it out is one of the first things on my todo list for after the release of my game (time is always in short supply).

    P.S: One of these days, I'll definitely check out 'Kill2Kill'. According to the video, it looks like *crazy* fun :D