Sign in to follow this  
javasirc

C# XNA mulitplayer online book?

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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? =(

Share this post


Link to post
Share on other sites
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. :]

Share this post


Link to post
Share on other sites
According to the XNA documentation, you can write and test all your gameplay network code without having any XBL or Windows Live accounts using PCs. The ridiculously stupid drawback is that you need the server/client to physically be on two separate PCs.

Also, in order to use any of the matchmaking or community features of XNA networking, you have to have XBL accounts. If you're testing on Xbox's you also need creators clubs memberships for each. So if you want to test your network code on xbox live, you need 2 Xbox's ($290 a piece), 2 creator's clubs memberships ($100 a piece) and 2 live accounts ($50 a piece), which is roughly $900 total. I guess that's not too bad considering most professional dev kits will run in the thousand (or tens of thousands, I'm not too sure these days), but holy crap that's quite a price tag for most hobby devs.

Share this post


Link to post
Share on other sites
If you have a friend with a box and Live, and assuming you already have an xbox and live account for gaming, then "all" you need is two CC memberships. That's still $200, though.

I'm more concerned about the requirement for Live! for users on Windows. I just don't understand how that can possibly succeed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this