Cross-platform development question

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?

[542 byte] By [daVinci] at [2007-12-29]
# 1
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).
JimPerry at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 2

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

BillReiss at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 3
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.
JonWatte at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 4
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.

daVinci at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 5

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

Mateuszwww.Kierepka.pl at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 6

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.

GregoryEnglish at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...