|
|||||||
| Forum Home | Register | Members List | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | ||||||||
|
Administrator
Location: London, UK |
Introduction
The following article is an adaptation of the XNA GameFest 2008 session on "Networking, Traffic Jams & Shcrodinger's Cat" by Shawn Hargreaves and Mitch Walker. It will introduce you to some of the headaches suffered by networking in XNA Community Games and propose potential solutions. This article assumes you have an interest in the XNA Framework and a basic grasp of general networking principles. This session is complimented by the session GDC 2008: Netwoking with the XNA Framework. The Inconvenient Truth It is incredibly difficult to syncronise games over a computer network. It will never be exactly precise. Only if you assume that there is no time, then and only then can networked programs be deterministic. The speed of light is not fast enough to be irrelevent. The speed of light is only a mere 186,282 miles per second, which is actually pretty slow. In order to travel 1000 miles, approximately 5 milliseconds are required. In order to traverse the Atlantic Ocean, approximately 4,800 miles, a mighty 26 milliseconds is required. Each router along the will, on average, add approximately 5 milliseconds to the total. To complicate things further, we don't even get the speed of light. Signals within fiber or copper will slow to approximately 60% of the speed of light! We can't really do much about this latency either. Even bandwidth is far from infinite. Event on the advent of broadband network connections and high-speed internet, the reccomended limit is still 8kb per second! The Five Stages of Networking As a network programmer, you will quickly become familiar the five stages of network development. These include:
Let us examine each phase in more detail: DenialTesting In order to test your networking, you can set and access several debugging properties in NetworkSession: Code:
NetworkSession.BytesPerSecondSent NetworkSession.BytesPerSecondReceived NetworkSession.SimulatedLatency NetworkSession.SimulatedPacketLoss Conclusions To conclude, there are serveral approaches to improving network performance under such tight restrictions:
Below I will briefly explain each potential improvement: Send Fewer Packets Questions & Comments?
__________________
Michael 'Adrir' Scott :: Games, Virtual Worlds, Education Networking | Research | Teaching |
||||||||
|
|
|
|
|
#2 | ||||||||
|
Moderator
Location: Philadelphia, PA |
Wow good job keeping notes.
![]()
__________________
Grant Shonkwiler() "I would love to fix the world if someone would just give me the source code" Website Industry blog LinkedIn |
||||||||
|
|
|
|
|
#3 | ||||||||
|
Administrator
Location: London, UK |
Thanks! There was a little more, but I was struggling to get it into the 10,000 character limit so I removed alot of the irrelevent stuff.
__________________
Michael 'Adrir' Scott :: Games, Virtual Worlds, Education Networking | Research | Teaching |
||||||||
|
|
|
|
|
#4 | ||||||||
|
Junior Member
|
great article! but I think you mixed a little thing up. the old internet connections/modems do not support 56 kB/s but rather only 56 kbit/s. this is a big difference, since 56 kbit/s is equivalent to only 7 kB/s !!! The restriction of the XNA framework comes from the assumption that most live users have at least a ISDN connection which in turn has a bandwidth of 64 kbit/s which is equivalent to the magic number of 8 kB/s supported by the XNA network library...
regards, salocinx http://www.swissplayers.com |
||||||||
|
|
|
|
|
#5 | ||||||||
|
Administrator
Location: London, UK |
Indeed, there may be some confusion over the units in that particular section.
If anyone is still interested, you can now download the original session from the Microsoft Download Centre.
__________________
Michael 'Adrir' Scott :: Games, Virtual Worlds, Education Networking | Research | Teaching |
||||||||
|
|
|
|
|
#6 | ||||||||
|
Junior Member
|
Great work, i must study this information, thanks!
|
||||||||
|
|
|
|
|
#7 | ||||||||
|
Junior Member
|
Those are the same five symptoms of World of Warcraft addiction! I so can't wait to get my fix tomorrow (payday).
![]() Last edited by Nightness : 02-02-2012 at 07:36 PM. |
||||||||
|
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
All times are GMT -8. The time now is 05:50 AM.
























Linear Mode

