XNA Game Development: Coding For Multiplatform Multiplayer 2

It occurs to me that I wasn’t thinking straight when I wrote the previous entry regarding my reluctance to use .Net 3.5 SP1 in ‘Encounters’ for hybrid networking.

In a clearer state of mind, it occurs to me that because only the Windows version of the game is going to use the WCF networking implementation, that only the Windows version of the game will require the 3.5 SP1 version of the framework as a result.

The Xbox 360 appears to use a version of the Compact Framework 3.5, however it’s worth noting that 3.5 is a binary compatible set of additional assemblies that run in the .Net 2.0 environment.

What this effectively means is that I can use functionality in 3.5 SP1 (specifically the ability to serailize objects that aren’t marked as DataContracts or Seralizable) for the Windows version of the networking stack without contaminating the code of the game and preventing it from running on a 360.

Even better, it means I don’t need to mark-up my data model with any kind of attributes to support network play on Windows and I shouldn’t need to use a dubious set of byte array wrappers for data that can be typesafe, effectively letting me maintain a “purer” game model.

I’ll move my development environment to 3.5 SP1 and test this theory later, but I suspect I can simplify the networking stack on windows without the need for any messy hacks because of SP1.

Sometimes sleeping on a problem really is the answer; I was about to do something pretty stupid.

3 Responses to “XNA Game Development: Coding For Multiplatform Multiplayer 2”

  1. » XNA Game Development: Coding For Multiplatform Multiplayer (blog) - davidwhitney.co.uk Says:

    [...] (3) home about david blog life stream visual exits   « Game Development XNA Game Development: Coding For Multiplatform Multiplayer 2 [...]

  2. Kryztoval Says:

    Hi there, how did this go?
    I want to do something simple, say, have a Crossplatform (or multiplatform) game that retrieves data in windows and forecast it (as a game state) to the Xbox360 one…

    I haven’t found a way to do this just yet, in fact, I have not found any tutorial or info on how to connect a game trough cross platforms :(

  3. david Says:

    Unfortunately you’re out of luck and that’s why you’ll not have found any tutorials on the issue.

    When XNA games (or in fact, any game at all) is compiled targetting the xbox, Microsoft does not allow any communications outside of the walled garden of Xbox Live – this is good in a way, as it ensures platform consistency (there’s a good story related to id software enabling multiplayer for Quake 3 on the dreamcast cross compatible with the PC – short version, deathmatch was unplayable for dreamcast owners due to the technical advantages of PC players). The downside is that all your XBLA “indie games” as they’re now termed, don’t have access to any outside resources (no online leaderboards, master servers etc) and have to use the xbox live peer to peer model for game hosting where one of the clients is elected as the server.

    Sorry for the bad news.

    As for my project, it’s temporarily on hold while I’ve been moving house and job but with any luck I hope to continue shortly!

Leave a Reply