Getting started with Xbox 360 development using the XNA Framework

Last week at CodeMash I attended Chris Gardner‘s (twitter here) sessions Beginning Xbox 360 Development with the XNA Framework and Intermediate Xbox 360 Development with the XNA Framework. I usually stick to sessions that relate more closely to the technologies I use, but since I now work in the gaming industry, I thought I would check out what goes into developing a simple game.

In just a few hours, Chris walked us through the basics of sprites, game components, and collision detection. His code example are available for download on Github here if you already have your dev environment set up and want to start out with a simple working game.

My gaming is pretty much limited to Call of Duty on PS3, but I wanted to give it a try myself. I went out and got an Xbox – MS has a deal right now you can pick up an Xbox for $99 with a 2 year Xbox Live subscription. You’ll need an Xbox with a hard-drive so get the 250 GB model unless you really want the Kinect, then you’ll have to buy the hard-drive separately.

You’ll need Visual Studio 2010 on your PC to start. I would suggest having your Xbox and display it’s hooked up to near your dev machine for easy back-and-forth while getting set up. After that, you’ll need a couple things to get going:

1.) Install Microsoft XNA Game Studio 4.0

downloadxnagamestudio4

 

2.) Create a new Xbox 360 Game Project in Visual Studio.

In Visual Studio, go to New->Project. Select Xbox 360 Game from the list

It should create a solution with a game project and a content project. Go ahead and try to build and run. You should see an error that no devices are available for deployment. (note:If you don’t plan on deploying to Xbox and just wanted to check out XNA, you’ll want to redo this step, but this time select new Windows Game instead of Xbox Game.  Just pick up a wireless PC connector for your Xbox controller and you’re good to start creating some games.)

So now we need to get your Xbox connected to your Dev environment. This requires that your dev computer and Xbox 360 console share the same subnet.  This thread might help you if you don’t understand what that means or run into trouble, but its a bit dated.

3.) Sign up for Xbox Live Indie Games membership. Complete the registration here.  (note – Microsoft charges $99/year to publish games to your Xbox/Marketplace. If you are a student, the fee is waived. You can still create games without the Xbox Game Studio membership, but you’ll have to publish them to a window on your PC and use a PC connector for your Xbox controller).

 

The screen will similar to the screenshot below, but you’ll have to add a credit card for payment unless you’re a student.

4.) Install XNA Game Studio Connect on your Xbox

- Select Search Games from the games menu

- Search for “XNA” and select XNA Game Studio Connect

- Download and install Game Studio Connect

5.) Add your Xbox to Game Studio Device center.

In Visual Studio, go to the Tools menu, select Launch XNA Game Studio Device Center

Select Add Device

Should see a prompt for a connection key

Fire up Game Studio Connect on your Xbox, if you have everything set up correctly, it should display the connection key.

Enter the connection key, click Next. It will test and then connect. You should receive the message below if it worked.

And your Xbox should be waiting for you to build and deploy something.

Back in Visual Studio, press F5 to run our solution again. This time your ‘game’ should deploy and if it all is working correctly you should see the cornflower blue on your TV.

Tada! Awesome game. If you’d like a game that is more than just a blue screensaver, check out Chris Gardner’s examples of a simple asteroid game. Good luck!

2 thoughts on “Getting started with Xbox 360 development using the XNA Framework

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>