Re(2): Network game design (UDP)
Re(2): Network game design (UDP)
- Subject: Re(2): Network game design (UDP)
- From: Jens Bauer <email@hidden>
- Date: Fri, 28 Jun 2002 11:14:54 +0200
Hi Eric,
On Thu, 27 Jun, 2002, Eric Gundrum <email@hidden> wrote:
>
--- At 3:26 AM +0200 6/27/02, Jens Bauer wrote:
>
>-So... Is it worth the trouble supporting networks behind modems, or
>
>should I assume that noone is using PPPoE for gaming ? :)
>
>
Jens, don't you mean to say "PPP"? I can't imagine PPPoE slowing your
>
connection enough to matter.
No, in fact, I meant PPPoE.
What I was thinking about is... You have a phone line or ISDN, which is
pretty close to a 56k modem.
-But you have a local area network, that dials out on demand.
This kind of PPPoE would not be fast enough, if sending 2 packets through
the same bottleneck,
but if sending the information in the same packet and passing them on to
the different servers within the LAN, I'll save enough bytes to do the
complete transfer.
Here's a small picture of what I'm thinking about:
.--- playerD
/
playerA -----. /----- playerE
\ /
playerB -------+- modem - internet -+------- playerF
/ \
playerC -----' \----- playerG
\
'--- playerH
Player A, B and C each sends their own moves including the cycle#.
Player D is the game master in this case, and receives the information.
Player E, F, G and H also sends their moves and cycle# to player D.
When player D received all 8 moves (including its own), it "broadcasts"
all the 8 moves back to each player.
All players now know exactly what's going on on each client, and they all
act the same.
Now, let's put our bandwidth measurement instrument on the modem.
We'll roughly send packetsize*3 and receive packetsize*8*3, which is
packetsize*9, and if packetsize is 20, we'll transfer 1800 bytes.
Multiply this by 10 to get the baud rate. Now this is per second only,
which means if we have 8 cycles per second (most likely), we'll need
180000 baud. It's pretty difficult to stuff this through the modem.
Instead, we'd save a lot, if player A forwards the received moves to
player B and player C. :)
>
Any connection less than about 10 mbit is
>
pretty much saturated by PPPoE. As for people gaming behind PPPoE: yes,
>
lots, probably more than any other high-speed connection. (I assume that
>
people game more from home and that there are more PPPoE connections in
>
homes than anything but dial-up.)
>
>
Is there a reason you do not consider using TCP instead of UDP?
TCP is slower and sends larger headers.
>
Your comments suggest that you want reliable delivery; that is what TCP
is for
>
-- why reinvent it.
UDP is quicker, as far as I'm convinced, and it's closer to a "direct
modem connection" from the old days. ;)
Love,
Jens
--
Jens Bauer, Faster Software.
-Let's make the World better, shall we ?
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.