Index: [thread] [date] [subject] [author]
  From: Evan Martin <txs@concentric.net>
  To  : ggi-develop@eskimo.com
  Date: Sat, 17 Apr 1999 06:12:46 -0700

New ggi program released (and network programming question)

I have decided to release a version of the game I've been writing,
called "phere" for lack of a better name.
It will be a 3/4 overhead 3d tank shoot-em-up.  
It isn't very complete. I wouldn't call it a "game" yet, but I 
like to think it's still worth looking at. :)

More information, screenshot, and downloads are available at 
http://e.x0r.ml.org/phere .


One reason I'm releasing it, though, is so I can also ask a 
offtopic question regarding network programming.
I'm adding network play.  I've never really written network
support for a game, and I assume some people here are 
familiar with protocols and the like.

My question: I understand it's better to have updating done
using UDP (because there's less overhead, no retransmission,
etc).  Currently, when a person joins, the server sends a UDP 
message to all of the clients.  What has occurred to me, 
though, is that UDP isn't reliable.  This means it is possible
that the message will be lost.  Losing any important message
(ie "change map") wouldn't be good.

I can see two possible solutions:
- Establish a TCP connection and a UDP "connection" (in quotes
because UDP is really connectionless, but you know what I mean).
Send all important messages over the TCP connection, with 
unimportant ones going over UDP.  Problems: I don't know how
long a TCP connection will stay open (I'm see "connection reset
by peer" rather often on irc).  Double the number of sockets.
- Require clients to respond with an "I got it" message to 
important messages over UDP.  Problems: extra complexity, 
bandwidth overhead (which seems unavoidable no matter what).

What would be even better is if there were a third solution that
would be simpler.
Could someone knowledgeable about this sort of thing suggest
the better solution?

Thanks,

Evan Martin
txs@concentric.net
http://e.x0r.ml.org

Index: [thread] [date] [subject] [author]