Network play
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.
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.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| java network api | San_Andreas | 1 | 2,874 |
May 1, 2008 08:05 AM Last Post: AndyKorth |
|
| How to play Flash SWF? | ggambett | 3 | 3,121 |
Apr 14, 2008 02:49 PM Last Post: Duane |
|
| Getting network connection for a specified PID | Florian | 6 | 4,503 |
Dec 23, 2006 03:46 AM Last Post: Florian |
|
| Ways to Network. | BinarySpike | 28 | 11,720 |
May 10, 2005 07:44 PM Last Post: kodex |
|
| Network Code Design | Bachus | 5 | 4,214 |
Sep 26, 2004 06:54 PM Last Post: arcnon |
|

