Dan Rigsby – Coding Up Style

Developer.Speaker.Blogger

Archive for the 'XNA' Category

Installing Alien Game on a Zune using XNA Game Studio

Posted by Dan Rigsby on 19th September 2008

This post is a little more “101” than most of my posts, but I think it’s useful to show how easy it is to install and debug a game on the Zune using XNA Game Studio. For this series of steps, we are going to look at getting the game “Alien Game” up and running on a Zune from scratch.  Once you have done this, you should know the basics to install other games, or deploy your own.

Steps to Install

1. Download Zune 3.0 firmware or greater

2. Install XNA Game Studio 3.0 Beta or greater

You will need to have Visual Studio 2008 installed or Visual C# 2008 Express installed first.

3. Open Visual Studio and ensure XNA Game Studio is installed

You can do this by checking the “About Visual Studio” window located in the “Help” menu item.  Scroll down until you find the XNA Game Studio:VSXNA1

4. Download “Alien Game” and extract to your local disk

5. Open the AlienGameZune.sln file in Visual Studio

When opened you should see the AlienGameZune project and all of its files and resources:

AlienGame

6. Connect Zune to your PC via the Usb Cable (not Wifi)

Be sure that you don’t have any other Zune software running since Visual Studio needs full control of the device.

7. Add Zune to the XNA Game Studio Device Center

You can access the XNA Game Studio Device Center via the start menu or through the Tools menu in Visual Studio.
VSXNA2

One in the XNA Game Studio Device Center, Click “Add Device”:

XNA1

On the next screen select “Zune” and continue:

XNA2

If your Zune is connected correctly, you should see it in the list with the device name.  More than one Zune will appear, if you have multiple devices plugged into the PC.  If you don’t see your device, double check your connection.

XNA3 

Once you have selected your device, you need to make sure you have it selected as your “default Zune device”.  If you only have one Zune you are using, then this is automatically selected for you.

XNA4 

Now that the wizard is finished, you should see your Zune device with a “green checkmark” that indicates that it is ready:

XNA5 

8. Simply run the debugger from Visual Studio by pressing F5

You should see all of the files transferring down to the Zune.  Once the game is running, you can play the game, set breakpoints in Visual Studio, etc.

Nabbing Screenshots

One other little tip, is that you can snag screenshots of the an executing game on the Zune.  This won’t work unless you are currently running a game from your PC to the Zune.  All you need to do is to right click on the device in XNA Game Studio Device Center and select “Take Screen Capture”.

XNA6

Here are a couple of screenshots nabbed from “Alien Game”:

DanR-2 DanR-1

DotNetKicks Image

Posted in XNA | 2 Comments »

XNA Game Studio 3.0 Beta – Released with 64-Bit Support

Posted by Dan Rigsby on 19th September 2008

XNA Game Studio is Microsoft’s cross platform game development extensions for Visual Studio and .Net.  With it you can target games and applications for either Windows, Xbox 360, or Zune (running >= the 3.0 firmware).

A few months back I blogged about the release of the CTP of XNA Game Studio 3.0 and about how there was no 64-bit OS support.  Well, a couple of days ago, Microsoft released the first Beta of the Studio. This release was heavily overshadowed by the release of the Zune 3.0 software and firmware.  However, I am pleased to find that there is finally 64-bit support, and I have it up and running.  This Beta release requires Visual Studio 2008 (2005 is no longer supported).  If you don’t have Visual Studio, but want to try out XNA Game Studio, you can always download Visual C# 2008 Express (which is free) and install XNA Game Studio on it. The only language supported is still C#.

Once you have XNA Game Studio installed, you can start creating projects by using one of the predefined templates:

xna1

Notice that there are 2 different templates for each of the 3 target project types (Windows, XBox 360, and Zune).  When a project is created, each target platform project has a different Icon:

xna2 

This makes it a bit easier to tell what a project is targeted for.  You could also look for the XnaPlatform node in the xml for the .csconfig file:

<XnaPlatform>Zune</XnaPlatform>

The 3 possible values are “Zune”, “Xbox 360”, and “Windows”.

You can download XNA Game Studio 3.0 Beta here: http://creators.xna.com/en-us/3.0beta_mainpage

If you are interested in doing Zune work, the game “Alien Game”, which was introduced in the CTP, is back for the Beta.  You can download it here: http://creators.xna.com/downloads/?id=199 and start tweeking it.

DotNetKicks Image

Posted in XNA | 6 Comments »

XNA Game Studio 3.0 CTP, no 64-Bit support (yet)

Posted by Dan Rigsby on 22nd May 2008

As a Zune owner I have been quite excited to get my hands on XNA Game Studio 3.0 CTP.  I am excited about not only being about to develop games, but also applications for my Zune (see this post about XNA for the Zune).  So, I eagerly downloaded the setup, ran the install, and all was well, until I went into the “XNA Game Studio Device Center” to add my Zune device:

xna

After clicking “Next” I was greeted with the following error:

System.IO.FileNotFoundException: Unable to find the specified file.
   at Microsoft.Xna.GameStudio.DeviceManagement.UnsafeNativeMethods.AcquireZuneTransport()
   at Microsoft.Xna.GameStudio.DeviceManagement.ZuneDeviceInfo.GetAllConnectedDevices()
   at Microsoft.Xna.GameStudio.DeviceManagement.UI.ZuneNamePage.SetCurrentPage()
   at Microsoft.Xna.GameStudio.DeviceManagement.UI.AddDeviceWizard.Proceed()
   at Microsoft.Xna.GameStudio.DeviceManagement.UI.ZuneWarningPage.SetCurrentPage()
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

After a bit of digging around, I discovered that this exception is caused because there is no support for 64-bit operating systems in XNA Game Studio 3.0 yet.  Unfortunately, all of my PCs right now are 64-bit Vista to take advantage of >3.5 gig of ram and to test applications in 64-bit mode.  So, I will have to attempt to run this in a Virtual PC and hope I have better luck.

To save you some frustration, there are a few other things to note about this version of the CTP:

  • You must be running Visual Studio 2008 Standard Edition or higher or Visual C# 2008 Express Edition.  Those of you running Visual Studio 2005 are out of luck for now.
  • No game development for XBox 360 yet.  This CTP was released for working with the Zune.  Perhaps more CTPs will come out over time.
  • No support for 64-bit operating systems.  They should have support for this by RTM though (I hope).

Posted in XNA, Zune | 4 Comments »