Trying to catch a specific case. Disabling Network during game.

Last post 04-05-2008, 11:48 PM by JohnWestMinor. 4 replies.
Sort Posts: Previous Next
  •  04-02-2008, 9:41 AM

    Trying to catch a specific case. Disabling Network during game.

    I'm have a little problem, I'm testing my game at the moment and I have it checking for network exceptions. One case I can't seem to pin down is when I start hosting a game, and during gameplay, I disable my network connection. The game continues on, but stuff like the Guide and pausing doesn't work anymore until I re-enable the connection. The network session will not become null or disposed if this happens, but something must be happening. Any ideas of what I should be looking for?
  •  04-02-2008, 1:33 PM

    Re: Trying to catch a specific case. Disabling Network during game.

    I would think a SessionEnded event would be fired in this case with EndReason set to Disconnected.

     

  •  04-02-2008, 3:56 PM

    Re: Trying to catch a specific case. Disabling Network during game.

    I agree you should get a SessionEnded event in this case. To check if that is happening, take a look at your session object in the debugger and see what the SessionState property is set to.

    --
    XNA Framework Developer
    blog - homepage
  •  04-02-2008, 4:29 PM

    Re: Trying to catch a specific case. Disabling Network during game.

    I have a session ended event handler, which doesn't get called, I tried adding break points too. Frustrating. I'm also having problems with my gamerleft event handler, which gets called way after the fact, or not at all. All other network event handlers seem to be working fine.

    I should point out that this is on the host machine. I wouldn't mind too much, but when this occurs it breaks the guide and pausemenu, so I can't quit the game!
  •  04-05-2008, 11:48 PM

    Re: Trying to catch a specific case. Disabling Network during game.

    Is the pause menu hooked to the connectivity (why it would be, I can't begin to fathom, more than displaying data, anyway)?

    If it is, you might try seeing if you can undo that. It may not be what you want, but I personally have always enjoyed it when games let me screw around in multiplayer after an opponent lags out or disconnects.
View as RSS news feed in XML
©2007 Microsoft Corporation. All rights reserved. Privacy Statement Terms of Use Code of Conduct Feedback