XNA for C#
DirectX 9 for C#
DirectX 9 for C++
DirectX 9 for VB
Forum
   2D Series finished!
My Book: Out Now!
      
       Go to section on this site

Additional info


Latest Forum posts

 Flight cinematics
  Posted by: darthrevan
  When: 04/07/2009 at 11:22:59

 working?
  Posted by: Nemo Krad
  When: 02/07/2009 at 16:35:53

 Example Code (Specifically, for C#)
  Posted by: Nemo Krad
  When: 02/07/2009 at 16:33:46

 working?
  Posted by: Robes
  When: 01/07/2009 at 06:40:28

 get front vertices
  Posted by: Rich_Zap
  When: 29/06/2009 at 07:27:06

 Black geometry after resize
  Posted by: TimGradwell
  When: 27/06/2009 at 08:39:27

 Remier! Translation of some tutorials
  Posted by: alexg
  When: 26/06/2009 at 09:40:16

 For beginners
  Posted by: Archenon
  When: 25/06/2009 at 13:13:03

 Red X
  Posted by: Archenon
  When: 25/06/2009 at 13:07:07

 Graphics Device Problems
  Posted by: Anonymous
  When: 25/06/2009 at 12:40:40


Ads




XNA 2.0 Game Programming Recipes

Riemer Grootjans







Chapter 8: Networking in XNA 2.0 (28 pages)

The XNA 2.0 Framework contains networking capabilities, allowing you to play your game on multiple PCs and Xbox 360 consoles. Once again, the XNA team has made sure the same code can be used to connect a PC or an Xbox 360 console to a session over the network.

This chapter shows and explains how you can set up a networking session and how you can connect to an existing session. Next, you will learn how you can send and receive data to/from other players over the network. You’ll also learn how you can use the lobby functionality that comes with XNA.

8-1. Sign In for Networking Services
Before you can use any of XNA’s networking functionality, you need to sign in to the Gamer Services. This recipe shows you how easy this is.

8-2. Create a Network Session
The first step in connecting multiple computers over the network, is to set up a Network session.

8-3. Join a Networking Session
Once a Network Session has been created, other computers on the networks can join the Session. This recipe also shows how your program can stay informed about changes in the Sessions, such as players joining or leaving the session.

8-4. Send/Receive Data Over the Network
A Network Session is only useful if you can send over some data to other computers. This recipe shows you how this can be done.

8-5. Search for Networking Sessions Asynchronously
Since some networking operations, such as searching for active Network sessions, can take some time to complete, XNA also provides some Asynchronous network methods. These allow your program to continue while XNA is completing the network method in the background, allowing you to keep the use informed about any progress made so far.

8-6. Move from the Lobby to the Actual Game
XNA comes with basic built-in lobby signalling, allowing you to wait for all players to have toggled their Ready flag before starting the game.





Recipe 8-5: A new network session is created after no active session could be found on the network. A few players connect to the session and transmit data.


Google
 
Webwww.riemers.net


If you appreciate the amount of time I spend creating and updating
these pages, feel free to donate -- any amount is welcome !



- Website design & XNA + DirectX code : Riemer Grootjans -
©2003 - 2008 Riemer Grootjans
Translations

This site in English
This site in Korean
This site in Czech

Microsoft MVP Award



2007 - 2008 MVP Award
DirectX - XNA

Contents

News
Home
Forum
XNA 2.0 Recipes Book (8)
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
XNA 3.0 Recipes Book (8)
Downloads
Extra Reading (3)
Matrices: geometrical
Matrix Mathematics
Homogenous matrices
Community Projects (1)
Tutorials (160)
-- Expand all --


Thank you!

Support this site --
any amount is welcome !

Stay up-to-date

I don't have the time to keep a News section, so stay informed about the updates by clicking on this RSS file!