Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm working on a project with a buddy, he doesn't have a 360 nor does he have the money to get one right now, but we want our game to be submitted to XBLIG. So right now we're both designing our game on the PC but we're using adapted 360 controllers. What are the things we need to keep in mind during the process so that we can "easily" port our game to the 360 from the PC?

share|improve this question
2  
I'm not too sure this is good as a question. It should become a community question, since the only good answer would be a checklist combining all other answers. –  Elideb Apr 25 '12 at 9:25
    
By the way, if one of you has a 360 you can still test the project without issues. From Visual Studio you can create a copy of the game and libraries targeting Xbox 360, sharing all code and assets with the PC version. The files will be exactly the same ones, so you'll just have to use compiler directives in very specific sections of the code. –  Elideb Apr 25 '12 at 11:50
    
Being such a nub game designer at this point in my career I hadn't realized I'd asked such a broad question. There are some great answers here, I'm just not sure which to select. –  Lester Peabody Apr 25 '12 at 12:20
    
I wouldn't select any, but create a new one compiling all of them and mark it as a Community Wiki (CW) answer. But don't worry much about that. Even I'm not too sure how the CW stat should be handled. For reference: What are Community Wiki posts? –  Elideb Apr 25 '12 at 21:21
    
Yeah there's so much good information here that it definitely warrants a community wiki answer, at least I think it does after glancing through the CW FAQ. I actually flagged the mod to make it community wiki, but I'll create a separate answer in the interim. –  Lester Peabody Apr 26 '12 at 2:27
add comment

3 Answers 3

The best way is to periodically test the game in a console to check for performance problems or problematic garbage collections; otherwise you will end with a lengthy debugging and optimization session before publishing the game.

And when porting to Xbox 360, check all the cases specified in the peer review evil checklist.

share|improve this answer
2  
+1 for mention of evil checklist. –  George Duckett Apr 24 '12 at 15:50
    
Think deserves a vote solely for the link to the checklist –  Joe Apr 24 '12 at 15:59
add comment

You have to keep in mind that the Xbox360 has far poorer .NET performance than your average desktop PC (and a limited subset of it too!).

There are two main reasons: the Load/Hit/Store penalty (due to the architecture of the CPU/RAM/GPU) and the non-generational Garbage Collector.

For GC issues, which cause 'pauses' or 'freezes' in your game during runtime, you want to avoid any kind of runtime garbage, so be very careful with Strings (never concatenate for instance), never allocate reference type objects after your initial loading (ie no var obj = new MyCoolObject();), and be careful with foreach. I've made a blog post some time ago that covers some of these points: http://nextstopnowhere.wordpress.com/2010/03/26/garbages-out-pools-are-in/

But whatever you do, you will have to test on the Xbox360, and the sooner the better.

share|improve this answer
5  
+100, Test on the xbox asap. Learn to hate new MyClass() and myString + myInt.ToString() –  George Duckett Apr 24 '12 at 15:33
    
Thanks @GeorgeDuckett, you say it with very concise examples! –  jv42 Apr 24 '12 at 15:44
2  
@LesterPeabody There's a StringBuilder class in .NET too. Also, see this link. –  David Gouveia Apr 24 '12 at 16:02
2  
Yes, StringBuilder is nice, but remember that creating one StringBuilder is creating a new object on the heap. And you have to use it without calling ToString(). That's possible with the XNA builtin SpriteBatch/SpriteFont text rendering. –  jv42 Apr 24 '12 at 16:15
2  
@DavidGouveia that post, although true, is misleading when compared to the scope of this question. Yes, when operations are not in a loop is just won't matter, BUT if you are doing string concats in a loop on the 360. use the StringBuilder class. Not because it is faster, but because it will be less garbage for the GC to worry about. –  Joe Apr 24 '12 at 16:21
show 3 more comments

No one seems to mention this, but be sure to, at the very least, compile your project for the X360 every day. The Xbox only features a subset of .NET (.NET Compact Framework 3.0), missing lots of interesting stuff like Tuples, some collections, optional parameters, etc., so you will get bitten if you rely on any of them and don't realize you shouldn't until too late in the project.

share|improve this answer
    
+1 This has caught me out before. –  George Duckett Apr 25 '12 at 11:22
    
+1 I also got bitten. –  jv42 Apr 25 '12 at 12:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.