2010/11/02

XBOX game development

I'm a game developer!  Well, kind of.

For about a month, I've been working on a computer game using XNA, which is Microsoft's cross platform game development library.  Cross platform means that it's common across Windows, XBOX, and the new Windows Phone 7.  The game is a multiplayer ripoff of a fun little game for the iPad.  It's a 2D golf game, played from a side-on point of view.  You choose the angle of your shot and the power, and try to hit the ball in the hole. 

In terms of gameplay, it's about as simple as you can get.  But it might be deceptively simple.  If you have a round ball hitting a curved hillside at a certain velocity, what at angle should the ball bounce away?  Also, all the game menus and pretty effects are something that game players just take for granted, but if you get them wrong, they really can look bad.  I was surprised, actually, at how much goo there is once the actual gameplay stuff is complete.  You need a title screen, a main menu, a controller selection menu, a course selection menu.  Those menus should all transition nicely back and forth.  If you have multiple players playing at the same time, how do you arrange their power selection meters so that they don't stomp all over each other?  There's a huge number of issues, even with the most simple games.

I have a folder full of dozens of half-hearted game programming projects.  Some just little toys.  Some started in earnest and flamed out spectacularly.  But each taught me some lesson and got me a little closer.

XBOX Live has an Indie Gamer service, where you can pay $99 for the right to put a game up online and sell it for a buck or two or five.  I've been doing all my game development on the PC, and with an eye towards how many projects I've given up on, didn't want to actually spend any money until I was pretty sure that I was going to actually finish a game and put it up for sale (and hopefully sell more than 99 copies).

Over the past month, I've gotten about as far as I can on the PC.  The XBOX has some different interface stuff (controllers, for one thing, and some display issues, things of that nature), and I was pretty much ready to see if/how things worked on the XBOx.  I also was able to borrow an XBOX, so I now have all the tools I needed to test things out.

So, last night, I forked out the $99 and signed up as an XBOX Indie Developer.  Yay me.

After only a few minutes, my game was ported over as an XBOX game, and deployed on the console.  It showed up in the list of games available.  With baited breath, I selected the game and clicked to play it.

At work, I have a friend who is working on his own, much broader scale XBOX game.  He and I were talking about what might happen when we first deployed games to the XBOX.  The worst case, we agreed, was that some cryptic error message would come up, and we'd have no idea why the game failed on the console when it worked on the PC.  Without any clues, that would be a really tough debugging job.

So, when I started the game, I was met with an error message.  Some generic thing like "Sorry, your game could not be started, Error Code 4".  Fuck.

Google told me that error code 4 was just some generic error message.  I don't remember much about that, because while reading about XBOX error codes, I read about debugging on the XBOX.  It turns out that I could set breakpoints on my PC, and step through the program on the XBOX, one step at a time.  In just a minute, I found a bug in my code, and was able to get it fixed.

I started the game again, and it worked perfectly.  There it was, on the XBOX and on my TV.  Awesome.

The first thing I noticed was that that the TV cut off a LOT of the image.  This was a 15 year old 27" CRT TV.  On a computer monitor, 100% of the screen is shown.  TVs commonly show only a fraction of the image, so there was probably about 10 or 15% shaved from each side of the image.  When making a golf game, this is important.  I can't have the ball ever stop too close to the edge of the screen, or the players won't be able to see the ball anymore!

I called Diana in, and we were able to play multiplayer, each using our own controller.  This is pretty awesome, because up until this point, I'd only simulated multiplayer via the keyboard.  Having it work with the two controllers was nice.

I then took the XBOX and hooked it up to our nice TV in the front room, and it looked MUCH better.  None of the image was cut off anymore, and it was all high-def and glorious.  Very, very exciting stuff.

So what now?

I think that funcionally, the game is 99% complete.  There are a few lingering controller issues, but everything is basically set.

I need to do a full review of all the graphics and sounds.  Everything until this point has been stand in stuff.  I need images for the background of menus, a title screen, etc.  I need to make sure that I haven't ripped off copyrighted sounds or images without permission.

Levels.  I need to create the actual game levels.  I'd like to release with at least a couple courses.  Each course should have 9 holes, so that's going to be dozens of levels to create.  Levels are created in two parts.  First, the physical layout of the level is created.  This is done in a paint program, just painting black on white.  Everywhere that is black is "ground" and is what the ball can collide with.  Everything that is white is open air.  So I can get cranking on making five sets of 9-hole courses, but they'll just look like black-and-white images.  The second thing that needs to be done is painting those black-and-whites so they look awesome.  Eryn has helped with some sketches and they look spectacular, so I'm really hoping I can hit him up for some more.  There's certainly no shortage of artwork to be done, and I'm TERRIBLE at it, so I'm going to need all the help I can get at this point.

Finally, I need to figure out all the actual XBOX deployment stuff, and how to actually submit/market the game on the XBOX Indie Gamer site.  I'll need some whiz-bang screenshots and demo movie on YouTube, stuff like that.

I really hope all the big hurdles are behind me, but I've got enough experience to plan on something hiding around the corner.  Still, confidence is pretty high that I'll actually get this finished and released.

If any of my five readers happens to know any good computer artists (2d sketching) out there who'd be willing to donate their time, let me know.

2 comments:

Unknown said...

Woot! That is really cool. It must have felt so neat to see your work on the tv and play it with an xbox. That's fantastic.

I am also a terrible drawer. (I've always been more of a bureau kind of guy)

Anonymous said...

Chest and drawers? Chest? Drawers?

Adman