da Vinci

Hi guys!

I intend to make an application and deploy it on PC and XBOX. I want to know how do you want me to do it I see some ways:

  • I can copy my code in other directory and change references to Compact Framework. As a result I'll have two copies of my code. It's the worst alternative, isn't it
  • I can use only Compact Framework even on PC (if it's possible);

Something else What is the best way to do it



Re: XNA Framework Cross-platform development question

Jim Perry

Develop the code base that will exist in both projects in a 360 project, create the Windows Game project and link that code in then add whatever PC specific code you need (networking, WinForms, etc).




Re: XNA Framework Cross-platform development question

Bill Reiss

Most XNA code will work without changes on either platform, there are some exceptions like if you want mouse support on the PC, that code will need to have #if blocks around it or it needs to be in a PC-specific file, and there are some differences with point sprites. There are probably others as well but those are the major oes I've heard about. And of course you will want to avoid using any .Net Framework classes that are not implemented in the XBOX version of the .Net Framework.

Bill






Re: XNA Framework Cross-platform development question

Jon Watte

Create two projects, and add the sources to both projects. Make sure that one of the projects adds the source as references, so you don't get two copies of the file that will go out of sync. Then use #if in the source for the parts that are special to Xbox or Windows.






Re: XNA Framework Cross-platform development question

da Vinci

Jim Perry wrote:
Develop the code base that will exist in both projects in a 360 project, create the Windows Game project and link that code in then add whatever PC specific code you need (networking, WinForms, etc).
Yes, I would like to have cross-platform modules (codebase), Xbox-specific modules and Windows-specific modules, theoretically. You suggest using Xbox-specific modules as a core for Windows-specific modules.. hmm..

I realize that the best way to do it is to create the kernel which will contain #if blocks to make two platform-specific assembly.

Thanks to all. You've been a big help.




Re: XNA Framework Cross-platform development question

Mateusz www.Kierepka.pl

I sow on this post some solutions how to use "two projects in one solution":

http://blogs.msdn.com/manders/archive/2007/01/25/microbe-patrol-1-1-xbox-360-support.aspx






Re: XNA Framework Cross-platform development question

Gregory English

Everything that the other posters have said is correct. In my game library, I had the PC version created but then i finally went ahead and bought the creator's club membership, and i've been porting over to the xbox360.

The only big differences between the 2 is that the 360 uses the compact framework, so there is no Networking support on the 360, also the 360 doesn't have mouse device support, and you're required to use the ContentManager for content assets. Other than that, i've not run into any big problems porting the code. And i can't think of anything else that will work on PC but not on 360.