Network play

rvangaal
Unregistered
 
Post: #16
Indeed, flexibility is the word here. For the high-end games, there's nothing wrong with just going for UDP (IMHO).

TCP is a stream indeed, so you'll need a way to distinguish packets. Although that's a matter of a single integer (16-bit perhaps), in this world of bandwidth limitations that is a first sign to look for a better approach.

Lost reliable packets can also be piggybacked on regular, non-reliable packets through UDP, giving a chance for improved bandwidth. It all adds up in small quantities (to choose for UDP instead of a mixed UDP/TCP). If only the increased complexity of your network layer.

TCP btw has a TCP_NODELAY flag to have every write() being sent immediately.

I don't know, for a game you CAN do better than TCP, as TCP wasn't targeted at speed and bandwidth as much, but reliability. It just takes time, but then again, that's what bleeding edge programming is for.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  java network api San_Andreas 1 3,260 May 1, 2008 08:05 AM
Last Post: AndyKorth
  Getting network connection for a specified PID Florian 6 5,091 Dec 23, 2006 03:46 AM
Last Post: Florian
  Ways to Network. BinarySpike 28 12,753 May 10, 2005 07:44 PM
Last Post: kodex
  Network Programming henryj 9 5,523 Jan 6, 2003 07:42 PM
Last Post: henryj