XNA Creators Club Online
Page 1 of 1 (24 items)
Sort Posts: Previous Next

Experience with the new Networking framework?

Last post 12/31/2007 5:51 PM by Waruwaru. 23 replies.
  • 11/29/2007 3:20 AM

    Experience with the new Networking framework?

    Hello XNA community!

    The feature I have been most excited about in the new XNA release is the new networking support!  Has anyone tried it out in the new Beta release?  I've been a bit busy with finals coming up, so I havn't had a chance to instal the new beta yet, but I can't wait to give it a shot.  I am looking forward to seeing what the community is able to do with the new XNA release.  If you have had a chance to try out the new features, please post your impressions.
  • 12/10/2007 3:07 PM In reply to

    Re: Experience with the new Networking framework?

    It's fantastic. I've seen some very elegant networking APIs in C++ (I love RakNet), but the simplicity of this is on another level. All while never holding you back. It doesn't have RPC but it has standard events that are fired for all users (such as GamerJoined, HostChanged), a built in lobby state in the networking paradigm (which I found as a nice surprise), and a nice NetworkGamer object that allows simple p2p communication.

    To get it up: you add a component, create a network session, and then either host or use matchmaking (.find()). You are up in no time.

    That being said, it has subscription requirements. In order to get someone up and actually playing over the internet, they will need:

    Games for Windows -- LIVE account
    Creator's Club Subscription

    In the world of PC Gaming, these comes across as steep reqs to me =\. It's not stopping me though, I love it. If I had to add anything to it in my dream world, it would be:

    Packet Compression
    UIDs for Game Objects

  • 12/11/2007 1:28 PM In reply to

    Re: Experience with the new Networking framework?

    The XNA networking API is fantastic to use. However, the requirement that end users must purchase a creator's club membership ($99) convinced us to go down the path of using System.Net and Amazon Web Services (Amazon Web Services). We use AWS for online storage, micropayments, and online servers. Unfortunately, we're indy developers (read: less than 5) so it was a disappointing decision for us to migrate away from a Microsoft technology in the interest of our users.
  • 12/11/2007 1:32 PM In reply to

    Re: Experience with the new Networking framework?

    Keep in mind that the networking for XNA is not intended for end users, so to say "the requirement that the end users must purchase..." is not really the correct statement. The XNA guys have said that currently the LIVE functionality as well as the Xbox platform as a whole are developer-land only for now. So if wide distribution is your goal (and Windows is your only platform), then yes, you will want to go with another API. If, however, you want to use the Xbox 360 and want to just play with networking, then I would definitely suggest the XNA API.

    Again, the restrictions of having the CC membership is a current, temporary thing. XNA's LIVE support is aimed as a developer-only thing. Eventually the XNA team will unveil their ever awaited distribution plan, and we will hopefully see a great way to distribute games.
  • 12/12/2007 2:17 AM In reply to

    Re: Experience with the new Networking framework?

    Hello,

    You can do networking easily with C# and XNA. You can look at the networking code in Visual 3D or look at the Network, Client and Server code in some open source c# and xna games.

    http://shadowrunmmo.svn.sourceforge.net/viewvc/shadowrunmmo/SRA_Development/

    Chris

  • 12/12/2007 4:49 AM In reply to

    Re: Experience with the new Networking framework?

    Also, Here is another C# Network Library.

    http://code.google.com/p/lidgren-library-network/

    Chris

  • 12/13/2007 5:25 PM In reply to

    Re: Experience with the new Networking framework?

    Nick Gravelyn:
    Keep in mind that the networking for XNA is not intended for end users, so to say "the requirement that the end users must purchase..." is not really the correct statement. The XNA guys have said that currently the LIVE functionality as well as the Xbox platform as a whole are developer-land only for now.
    Hi Nick. Thank-you for the time you took to reply to my post. I look forward to the day when they unveil a plan which would allow us to use LIVE on the Windows platform in the manner we described.
  • 12/13/2007 5:30 PM In reply to

    Re: Experience with the new Networking framework?

    Hey Slayer. Thank-you for the links.
  • 12/13/2007 7:35 PM In reply to

    Re: Experience with the new Networking framework?

    Hello Chromatic1,

    No Problem..

    I understand what MS is trying to do with XNA but I think one of the biggest issues is that Game Studio users want to develop games such as MMOs, MMORPGs or something that has rock solid networking support that doesn't limit you to having to just use Windows Live.

    I guess if you understand the limitations surrounded by following XNA Requirements, then you can build a multiplayer game for Xbox and the PC. But the main downfall of the networking system within XNA itself, is that XNA game studio developers won't be developing multiplayer games that can handle 500+ concurrent connections to an MMO via Xbox or the PC.

    As I had mentioned before. I have not looked to much into the network code but I am wondering how the live service is going to handle being a lobby service once hundreds of multiplayer games start popping up. I mean, just to think off the top of my head, Americas Army has tons of dedicated servers running to support thier game along with hundreds of other gamers. Windows Live is going to handle millions of concurrent connections with nothing more than the type of code found in the NetRumble Example? That gets me.

    Anyway, glad the links were helpful..

    Chris

  • 12/13/2007 7:46 PM In reply to

    Re: Experience with the new Networking framework?

    SlayerXI:

    I understand what MS is trying to do with XNA but I think one of the biggest issues is that Game Studio users want to develop games such as MMOs, MMORPGs or something that has rock solid networking support that doesn't limit you to having to just use Windows Live.

    I guess if you understand the limitations surrounded by following XNA Requirements, then you can build a multiplayer game for Xbox and the PC. But the main downfall of the networking system within XNA itself, is that XNA game studio developers won't be developing multiplayer games that can handle 500+ concurrent connections to an MMO via Xbox or the PC.



    I think the problem is that for every 10,000 "I'm going to write an MMO" posts, you might get one or two who actually can make MMOs. They are nothing trivial and therefore not something the XNA team should waste time supporting. Standard LIVE protocol supports up to 31 players and that's plenty more than what most people will wind up doing.
  • 12/13/2007 7:59 PM In reply to

    Re: Experience with the new Networking framework?

    Hello Nick,

    Yes, you are correct and I totally understand where you are coming from. I think one of the biggest issues is that it IS a change when moving from typical game development to XNA.

    I know that MS originally had to license GameSpy's tools to put thier games online. Windows Live I think is thier way of having thier own system without having to deal with a third party anymore.

    I know that Windows Live and XNA Network support for both PC and XBox are still in development. But Since I at one time followed all of the differences going from Halo on the Xbox to all of the new challenges that were faced networking wise with putting Halo on the PC, I am just wondering if the Windows Live Sevice and the Microsoft.Xna.Framework.Net are also taking into account the same considerations as they once were with Halo for the PC?

    Chris

    BTW: What I am referring to with Halo can be found here. http://archive.gamespy.com/e32003/feature/pc/1001764/ and here http://findarticles.com/p/articles/mi_m0EIN/is_2003_Nov_19/ai_110307987

  • 12/13/2007 8:38 PM In reply to

    Re: Experience with the new Networking framework?

    SlayerXI:

    As I had mentioned before. I have not looked to much into the network code but I am wondering how the live service is going to handle being a lobby service once hundreds of multiplayer games start popping up. I mean, just to think off the top of my head, Americas Army has tons of dedicated servers running to support thier game along with hundreds of other gamers. Windows Live is going to handle millions of concurrent connections with nothing more than the type of code found in the NetRumble Example? That gets me.

    1. The live serves only handle the initial connections so all clients can find each other... after that the computers jsut talk to each other.

    2. Microsoft know how to do this... the live servers for XBLA handle more than Americas army and then think about Live Messenger - thats probbly an order of magnitude higher. MS know how to do this stuff.

    3. Why do you think you have to pay the $99 to use it ?

    Play Kissy Poo - a game for 4 year olds on Xbox and windows
    The ZBuffer
    News and information for XNA
      Follow The Zman on twitter, Email me
        Please read the forum FAQs - Bug/Feature reporting
          Don't forget to mark good answers and good playtest feedback when you see it!!!
  • 12/13/2007 10:27 PM In reply to

    Re: Experience with the new Networking framework?

    What is "XBLA"?  Xbox Live Arcade?
  • 12/13/2007 10:48 PM In reply to

    Re: Experience with the new Networking framework?

    Aj6627:
    What is "XBLA"?  Xbox Live Arcade?


    Yes
    Brandon Bloom
    Software Design Engineer
    XNA Platform and Tools
  • 12/14/2007 5:23 PM In reply to

    Re: Experience with the new Networking framework?

    I sent this email to our development staff to summarize my thoughts on Xna.Net. To contextualize this conversation, we are building a title for Windows.
    All,

    In the summer of 2004 we had rudimentary networking in Blockrealm . We submitted the game to the connected systems developer competition and the competition judges were able to move and place blocks in a connected world. In addition, voice over IP support (implemented by Anthony) allowed players to communicate to one another. This simple networking functionality was achieved through DirectPlay. Six months later Directplay was deprecated-- DirectPlay, it was said, would be soon replaced by a .NET Windows version of LIVE for XBOX. Three years later this promise has come to fruition; however, there are limitations present in the Xna.Net API that did not exist in DirectPlay. I would like to share with you the things I have learned and, based on this knowledge, what I think the best approach is going forward.

    It is said that in building an MMO, the networking infrastructure is as equally difficult as building the 3D engine. I personally do agree, and to address this difficulty we have used technologies that are easy to use but uncommon to the game industry. Specifically, we used AmazonS3’s distributed storage network to store mass amounts of game data. Our use of this storage network allows us to handle player data, player-to-player content sharing and news dissemination. Similarly, using the simple IRC protocol we designed a solution for scalable player-to-player chat. IRC servers run by Amazon EC2 may be connected for increasing scalability to support hundreds of thousands of users.

    While the aforementioned functionality is complete, one area of MMO architecture we have not addressed is real-time player interaction. For example, what happens if a player moves a block and a new player logs in and receives stale world state from AmazonS3? What system orchestrates monster AI and attack sequences? We put things on hold and entered a holding pattern to see what functionality would be provided through XBOX Live.

    XBOX Live via Xna.Net offers a .NET centric API for building network and online games. In terms of ease-of-use there is no better solution available to us and equally important, this is a solution that runs on Windows and the XBOX 360. However, Xna.Net has limitations which in theory prevent its use in a massively multiplayer game. Here are the obstacles as I see them:

    1) The Xna.Net host support a maximum of 31 players. While this number could change in the future, for the duration of the XNA 2.0 lifespan this number is unlikely to change. In the XNA forums one developer writes, “I think the problem is that for every 10,000 "I'm going to write an MMO" posts, you might get one or two who actually can make MMOs. They are nothing trivial and therefore not something the XNA team should waste time supporting.” To this end, the XNA team does not want to build or support a networking API that could conceivably serve as a foundation for an MMO architecture. The prevailing logic is that if we want this functionality we should use System.Net. However, System.Net does not run within the XBOX360 XNA security sandbox. To use System.Net means to abandon hope of using player profiles, the marketplace, and player-to-player chat services associated with LIVE. In short, if we use XNA.Net the 31 player limitation and peer-to-peer LIVE architecture is something we have to live with.

    2) Only one game server instance may run per physical machine. One approach to overcome the 31 player limit is to virtualize our servers and run 1 to N game server instances on our rented game servers at 1&1; however, because of the one game server limitation in Xna.Net this is not a viable solution.

    3) XNA System.Link connections do not allow connection of computers outside a single subnet (local LAN). The XNA System.Link connection type is ideal for what we are trying to accomplish. However, it does not allow connections across the Internet.

    4) To use XNA LIVE to enable peer-to-peer connections across the Internet our players must have the following (as of 12/14/2007):

    1) An XBOX 360 to register for a LIVE Silver or Gold Membership and
    2) a LIVE Silver or Gold Membership to purchase an XNA Creators Club Membership.
    3) An XNA Creators Club Membership ($99/year) to enable LIVE networking for a game title.
    4) An XBOX Gold Membership ($59/year) for LIVE networking across the Internet, and lastly
    5) The fee or subscription model we require on-top of aforementioned services.


    For the typical XBOX player requirements 1 and 2 are reasonable; 3 is not tenable. For a Windows player only requirements 2 and 5 are marginally realistic expectations for end users. Rumor is that the XNA/LIVE team is working on a content delivery system that removes some of these obstacles. However, there is no mention of schedule or an anticipated date for completion. Not even a triple AAA Windows title could succeed in forcing users to jump through the hoops necessary to play a game with Internet connectivity.

    5) LIVE connectivity requires that a title completes quality requirements (TSRs) established by Microsoft. We would have no alpha or beta of a networked version of our game; instead, we would have to wait until Micrsooft approves a near-complete version of the title for use on LIVE. Our ability to release is determined by whether our game meets playability standards set by Microsoft. Titles such as Habbo Hotel and Second Life, while immensely successful MMO games, would likely not pass such metrics. I do not expect our game to be any different due to the evolving nature of MMO quality, gameplay, and complex ity.

    So these are the obstacles to using XNA.Net. If you can believe it, I still think we should use Xna.Net. What I propose here is that we continue use of Amazon Web Services and supplement it with XBOX Live for real-time player-to-player interaction.

    Many of you know that at present our game worlds are generated client-side using a unique hash. This integer determines the shape of the terrain, location of trees, presence of mines, quarries, shops, and common area. We support as many worlds (“Jungle, Forest, Desert, Swamp, Barren, etc”) as values exist in a 32-bit integer (4294967920). We know that even with our portal system only a small fraction of worlds can or should exist. To date, we have a limit set at 1000 world areas. So the first step to using Xna.Net is that we scale back the size of each world so that its size is appropriate to 31 players. This means that we need to reintroduce the artificial “non-passable” mountains we were using earlier this year.

    How would this look in the code? The NetworkSession class in Xna.Net allows a game host to specify custom properties. For example, when a server is created it can broadcast custom information stored in the form of integers. (Convenient for us, isn’t this?)

    So when a player enters a world or walks through a portal to a world, the client searches to see if a game is in progress with the said Int32 hashcode. If the network session exists the player can join an in-progress game, connect to AmazonS3 to download the player-built world, and then begin play. If the network session does not exist the client serves as the host and create a game ad-hoc with permissions for users to join the game in-progress. This approach is deterministic and easily accomplished using our current game architecture. When a player exits one world through a portal and enters another we use the Xna.Net host migration feature to transfer the host to a new peer transparently. If no peer exists the world is saved to AmazonS3 and the session ends.

    There are corner cases to this use case that will cause problems, none of which are insurmountable. A. What happens if the last host loses connection before writing to Amazon S3 (accidently or purposefully)? B. What happens when a player tries to walk through a portal to a world with 31 players? C. Is Pandora’s box opened by running critical game logic client-side – how will this be exploited by users?

    A. We modified the byte stream so that we send as little information as possible to represent a world. I think Mihail has it very close to the theoretical minimum. 1MB of data can represent complete ephemeris for over 40,000 objects (position, rotation, type, and owner ID). A world with 5,000 blocks is large. 10,000 blocks is down-right crowded. So if we assume 10,000 to be an average maximum (but not a statistical outlier) we can plan on 250KB of data being written to S3. We can have this data written out asynchronously in a separate thread fairly easily. We’ll need to store the user interaction delta since the last save; network command journaling in Suva3D should make this possible.

    B. I suggest that we disable the shimmering texture in the portal when passage is not allowed. The difficulty is that only one Xna.Net connection is allowed, so we’ll need to store a number of players value in the region metadata we store on S3. Peers can update this value periodically using the NetworkSession.PlayerCount value so that we don’t have to worry about race conditions.

    C. We can limit the return on investment for hackers by setting up a dedicated server with our web services to facilitate secure transactions (i.e. adding/removing things from player inventory and shops. Too bad). Or better, we can use this: AWS DB.

    As an aside, here are some great things we’ll be able to do with Xna.Net. Player positions will be sent using UDP for non-reliable non-ordered delivery. Block manipulation will be sent using reliable ordered delivery. For region ownership and the player coat-of-arms picture we can use their gamer image. Lastly, By limiting each world area to 31 players and using XNA.Net for player and block ephemeris our old networking design is simplified.

    To learn more about Xna.Net here are useful links:
    http://msdn2.microsoft.com/en-us/library/bb975801.aspx
    http://forums.xna.com/thread/35546.aspx
    http://forums.xna.com/thread/34455.aspx
    http://forums.xna.com/thread/35530.aspx


    Separately, Matt you’ll be glad to know that they added IsButtonUp and IsButtonDown for the XNA controller. What classes do we need to clean up now to remove or own implementation of this?
    http://msdn2.microsoft.com/en-us/library/bb975648.aspx


    Lastly, Mihail, here is change log for XNA 2.0. After we finish up on the current round of bugs I see us porting over to XNA 2.0 while I ready general release of Suva3D. Looks pretty good, doesn’t it? The places where we *have* to change code will throw compile errors.
    http://msdn2.microsoft.com/en-us/library/bb975648.aspx


    Questions, thoughts?
    Shaun Tonstad
    1-877-456-SUVA, Ext. 3
    Suva Interactive (www.suva3d.com)
  • 12/14/2007 10:40 PM In reply to

    Re: Experience with the new Networking framework?

    Please keep in mind that my quote:

    In the XNA forums one developer writes, “I think the problem is that for every 10,000 "I'm going to write an MMO" posts, you might get one or two who actually can make MMOs. They are nothing trivial and therefore not something the XNA team should waste time supporting.” To this end, the XNA team does not want to build or support a networking API that could conceivably serve as a foundation for an MMO architecture.


    I don't work for Microsoft. That's just my view and therefore not the official word. I'm sure they share that sentiment, but they would probably word it differently. ;)
  • 12/17/2007 12:08 PM In reply to

    Re: Experience with the new Networking framework?

    If 10,000 people buy an XNA game creators subscription and 2 people of them succeed in making an MMO, then it makes no difference because Microsoft still got paid for 10,000 subscriptions. If there is a way for microsoft to milk more money out of us, they will find it and exploit it.

  • 12/17/2007 12:18 PM In reply to

    Re: Experience with the new Networking framework?

    GPrime:

    If 10,000 people buy an XNA game creators subscription and 2 people of them succeed in making an MMO, then it makes no difference because Microsoft still got paid for 10,000 subscriptions. If there is a way for microsoft to milk more money out of us, they will find it and exploit it.



    I'm afraid I don't get your point. My point is that it makes no sense for the XNA team (and for that matter the Xbox LIVE and Games For Windows LIVE teams since all XNA does is wrap their functionality) to support an MMO type situation when the vast majority won't be able to create an MMO. Not to mention that an MMO requires a persistant server. Microsoft is certainly not going to start allowing random people to create persistent servers on their machines, so where would these servers be? They can't be anywhere else otherwise LIVE would be a whole lot less secure. So it's pretty much impossible for the XNA team to give anyone the ability to make an MMO with the LIVE networking. If you want to write an MMO, do what the poster above is doing and utilize other technologies for networking while using XNA for everything else.

    Also, let's keep the "Microsoft is trying to take over the world and steal all our money" conspiracy type discussions elsewhere. They are unnecessary and unhelpful.
  • 12/18/2007 9:34 PM In reply to

    Re: Experience with the new Networking framework?

    When puzzled by limitations why not revert to something called CREATIVITY!

    Think Diablo 2, remember that game? It was an online RPG but no need for a massive server since you would have a client host a game and his friends would join that game via IP or BattleNET. Just use the Xna.Net and the nice LIVE interface. It saves you lots of development money and you can focus on the other parts of the game.

    It’s not the XNA Teams job to support every part of the game development process, If you want to make an MMO you need to hire people that know how to program it. If you’re a hobby game developer or an independent you need to stop dreaming about making that next big blockbuster MMO or hire a team that can make it.

    Keep up the great work XNA Team! :)
  • 12/19/2007 2:59 PM In reply to

    Re: Experience with the new Networking framework?

    GPrime:
    If there is a way for microsoft to milk more money out of us, they will find it and exploit it.

    Gotta call BS on this. If MS wanted to make money, they'd be charging for the DirectX SDK, the Express versions of Visual Studio, and for Game Studio. They're not, it's all free. If you want to criticize MS at least make sure you know what you're talking about. :(

    Jim Perry - Microsoft XNA MVP
    If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job.
      Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki.
        Please mark posts as Answers or Good Feedback when appropriate.
  • 12/28/2007 11:34 AM In reply to

    Re: Experience with the new Networking framework?

    I have to agree with this, XNA Live is very good value for money.

    Paying 99$ for using Live as an network development platform is not expensive, especially considering what Machaira allready wrote, that the Game Studio in it self is totally free.

    Hopefully we will see a nice model for distribution in the future, which will just add to the existing value of this great development environment. This is off course necessary in the long run, if developing for Live should be of any use :) But until then, start developing ;)

     

  • 12/29/2007 1:38 AM In reply to

    Re: Experience with the new Networking framework?

    To get around the 32 player limit in an MMO, you'd probably be using a server farm anyway. In which case, every computer acts as a subserver, accepting 32 players. Each subserver is a client of the server (using System.Net or something since the servers will be running windows) probably using a gigabit internal network. In effect, you can get past this limitation by daisy chaining servers togeather.
  • 12/31/2007 2:34 PM In reply to

    Re: Experience with the new Networking framework?

    It's true that Microsoft wants to make as much money as possible, but I don't think they're trying to do it at the expense of the indie game developer. Remember the PS2 Net Yaroze program? You had to fork over 1000 dollars for one of those. Even if you pay the 99 dollars a year for the life of the 360, you won't pay 1000, so the barrier to entry is much lower. What Microsoft is banking on that if just five of those people who pay the $99 make a publishable game (see last years Dream Build Play), they will get 5 more games for the Xbox platform (and in this case published by Microsoft).

    99 dollars is small change when you look at the profit potential there. In other words it's a nominal fee. If you're doing windows only development, you don't NEED Xbox Live. You should be building your own networking framework, especially in the case of an MMO. And if you want to get your hands on the big guns, (I.E. servers certified for the live network) you've got to prove that your game is worth it. Scale it down, make it fun for 8-32 players, and enter Dream Build Play. Going back to Blizzard, Diablo 2 was basically a stepping stone for WoW. At it's heart WoW is nothing more than Diablo 2 scaled up and rebranded with Warcraft trappings.

    What I'm saying is it's more important to get SOMETHING out there fast that can hook an audience and brings you a step closer to your ultimate goal. Another example of this is Bioware. They started with existing IP (Forgotten Realms and Star Wars) to get their name out there. Now they can make games based on their own IP (Jade Empire and Mass Effect) that don't need to be tied to a big name universe to be a smashing success.

  • 12/31/2007 5:51 PM In reply to

    Re: Experience with the new Networking framework?

    Ivolved:
    Remember the PS2 Net Yaroze program? You had to fork over 1000 dollars for one of those. Even if you pay the 99 dollars a year for the life of the 360, you won't pay 1000, so the barrier to entry is much lower. What Microsoft is banking on that if just five of those people who pay the $99 make a publishable game (see last years Dream Build Play), they will get 5 more games for the Xbox platform (and in this case published by Microsoft).

    Yeah, remember C64? It was like $500!!!! </sarcasm>

    Yeah, Yaroze was ~$1000 (it came with a special PS1 too), but PS2Linux was around $200.  Today, I can install a few different Linux distros on PS3 for free.  It has been 10 years since Yaroze came out, I can still dig mine out of the closet, and run programs on it (funny how that works out to be $100 a year).  Same as my Ps2Linux codes.  My CC expires in a few months (I won't renew), and my games won't run on xbox any more.  Yeah, the tools are much harder to use on other platforms, but you can probably write more cross platform codes to get a wider audience.

    Comapring to XNA dev on Windows, the $99 CC membership seems a bit senseless.  On Windows for FREE, you get same awesome IDE + tools, more available libraries (physics/hardware access and more), and can work around EULA restrictions using your apis (forget MMOs, can't even do text chats).  The main attraction for $99 a year after original release is still the warm and fuzzies to play in their sandbox.  IMO, CC is really targeted at entry level commercial devs (costs and restrictive eula) than bed room coders.  If I have a game company looking to get on XBLA, the $99 is an amazing deal to test ideas on production hardwares (unfortunately the EULA says no commercial usage on xbox).  For non-profit game tinkerers who just want to share games with their friends, XNA on Windows is good, but CC/XNA-on-Xbox does not fit as well.

Page 1 of 1 (24 items) Previous Next