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

 quadtree / camera "jumping"
  Posted by: Tambourin
  When: 19/11/2008 at 04:35:27

 Custom Model effect problem, 4-7
  Posted by: horino
  When: 19/11/2008 at 00:48:57

 Skydome technique?
  Posted by: Anonymous
  When: 18/11/2008 at 19:49:52

 Single Terrain Texture
  Posted by: IrishKoder
  When: 18/11/2008 at 18:35:15

 Suitable for Beginner?
  Posted by: riemer
  When: 18/11/2008 at 12:45:25

 Find Mouse position in 3D point
  Posted by: Duallity
  When: 18/11/2008 at 05:55:21

 [XNA]My Shooter
  Posted by: Duallity
  When: 18/11/2008 at 05:44:21

 Find Mouse position in 3D point
  Posted by: ankesh.m
  When: 18/11/2008 at 03:54:23

 Model display overrides other models
  Posted by: ankesh.m
  When: 18/11/2008 at 03:01:55

 Suitable for Beginner?
  Posted by: Pineapple
  When: 17/11/2008 at 16:51:31


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
Downloads
Extra Reading (3)
Matrices: geometrical
Matrix Mathematics
Homogenous matrices
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!