C# XNA mulitplayer online book?

Started by
10 comments, last by hplus0603 16 years, 1 month ago
I was looking for a book that teaches C# XNA internet networking for multiplayer games and i couldnt find any. Does anyone know of a reliable book for this topic? I need to learn how to communicate between server and multiple clients using c# xna.
Advertisement
Last I checked, XNA had no multiplayer functionality, but one could still use regular sockets, and there was some unofficial support under Windows only.

But it's been a while, things might have changed.
Quote:Original post by Antheus
Last I checked, XNA had no multiplayer functionality, but one could still use regular sockets, and there was some unofficial support under Windows only.

But it's been a while, things might have changed.


XNA 2.0 added some networking stuff that you can use on the 360. I started my Windows project when 1.0 was out using Sockets, and I haven't yet tried any of the XNA-specific stuff.


Go to creators.xna.com and look in the Samples/Tutorials sections and they should have some networking examples.
There aren't any books out covering the new XNA networking features because they've only existed for about three months now. I would agree with the above poster to check the creators.xna.com page as they have a number of samples covering the new networking features.

There are also a few XNA books due out in the next few months and I believe a couple are going to showcase the networking as well, so check Amazon or your favorite book seller and you can probably find out more.
As Nick said, XNA now has networking support. It works on both Xbox 360 and on Windows Live! The drawback is that each client needs to use a separate Live! account -- each of which is $50/year.

There is also the option of the Lidgren networking library, which is a C# game networking library for C#. It won't work on the Xbox, though, because regular sockets aren't available on Xbox.
enum Bool { True, False, FileNotFound };
Though with the right interfaces you could probably make it cross platform. I've looked at what they give you in XNA and its pretty much just some premade functions similar to sockets, except they added in a lobby, gamestate, and some other management code for you. It probably wouldnt be incredibly hard to reproduce most of the behavior in sockets. Though automatic voice chat support is awesome(which is not easy).
-------------------------------------------------------- What''s the difference between engineers and architects? Engineers build weapons; architects build targets. --------------------------------------------------------
Quote:I've looked at what they give you in XNA and its pretty much just some premade functions similar to sockets


Yes, but you need a Live! account per participant. I think the Live! support library is great, but it's cumbersome to develop for on Xbox, and it makes absolutely no business sense on the PC.
enum Bool { True, False, FileNotFound };
Quote:Original post by keshtath
Though with the right interfaces you could probably make it cross platform.


You could reproduce the interface of the XNA networking API, but there is absolutely no way for a LIVE enabled Xbox game to communicate with anything other than games running on LIVE. So if having your game networked on Windows and Xbox matters, you have no choice but to use the LIVE networking.

Also to use the LIVE networking at this time also requires you be a Creator's Club subscriber ($49 USD for 4 months, $99 USD for 12 months). The XNA team currently considers the use of the LIVE network a "developer zone" whereby you can't actually use those APIs without having a Creator's Club subscription. Heck, the networking assembly doesn't even come with the XNA redist at this point. They will most likely include them in the redist at some point in the future, but for now those are the rules.
I was working on a windows game for online play (nothing to do with xbox) but i need to learn how to have the server talk to clients and back and forth and so on. Is this possible without xbox or a membership, with c# xna? Or am i learning the wrong language? =(
C#'s (or more accurately, .NET's) networking is perfectly capable of large scale servers, MMORPGs, yadda yadda. Restrictions come when you are using the XNA networking. The networking for XNA is, or at least seems to be, highly focused towards X-Box 360 style games. If you want to make multiplayer games for X-Box this is going to be something worth checking out. If you are not intending on using the X-Box like you mentioned, you can just completely ignore the networking part of XNA. Just because it comes with the bundle doesn't mean it is what you have to use. :]
NetGore - Open source multiplayer RPG engine

This topic is closed to new replies.

Advertisement