Microbe Patrol 1.1: Xbox 360 support
I've updated my Microbe Patrol XNA project to build for both Windows and the Xbox 360. I didn't make any other changes to the game, so if you don't have an Xbox 360 and a Creator's Club subscription, you might not find it worthwhile to upgrade to this version.
I used the "two projects in one solution" approach that Steven Styrchak and Shawn Hargreaves are recommending over the "one hacked-up project with two platforms" approach that others have tried with some success. It seems like there's not a perfect way to handle the two platforms in XNA, but I found the "two projects" approach reasonably usable.
When you open the Microbe Patrol 1.1 solution file, the default platform will be "Mixed Platforms." When you build, it will build for both platforms. When you hit "F5" to start the program, it will also try to deploy to both platforms. This is all swell if you really want to build and test on both platforms, but if you don't have a 360 (or the 360 isn't waiting for the connection), you'll get this error:
------ Deploy started: Project: MicrobePatrol_Xbox, Configuration: Debug Xbox 360 ------
Error: An active Xbox 360 console is not available for deployment. Register an active device using the XNA Game Studio Xbox 360 page in the Options dialog box.
It's harmless (you can still run the Windows version), but if you just want to build for Windows, change the platform to "x86" in the toolbar:
That way it won't try to build/deploy for the 360.
As predicted by the "safe area" gurus, some key screen area of the game was getting cut off on the 360. So I adjusted the app's view matrix, and (since everything rendered in Microbe Patrol goes through the view and projection matrices) that did the trick:
Matrix viewMatrix = Matrix.CreateScale(0.9f); // Zoom out a bit to account for video "safe area"
Matrix viewMatrix = Matrix.Identity;
I'm very impressed with how easy it was to get the game up and running on the 360!