Networking in Massive Games

Started by
12 comments, last by Fistandantilus 21 years, 4 months ago
I was trying to acquire information about the networking code in massive games: -What kind of protocol they use? TCP/IP? or maybe UDP/IP? -Is it possible to make a massive using DirectPlay? -What kinds of messages are sent to the server and what kinds of messages are sent to the client? -Links to this kind of information Thanks in advance
Advertisement
I don''t really know what they''re using, but I''ll try some logical conclusions:
quote:Original post by Fistandantilus
-What kind of protocol they use? TCP/IP? or maybe UDP/IP?
I''d think TCP for all controlling streams as it''s the only reliable alternative. UDP can be used if you''re streaming video or audio, or other data that it can handle losing a few packets of. UDP doesn''t have any machanism for recognizing and retransmitting lost packages, nor to sort packets that are out-of-order, like TCP do.
quote:-Is it possible to make a massive using DirectPlay?
I doubt it. A smaller, peer-to-peer, group is possible, but not for massive ones.
quote:-What kinds of messages are sent to the server and what kinds of messages are sent to the client?
* Login/logout (authentication), game joining and similar stuff
* Clients sends the player''s actions etc. to the server
* Server sends updates on the game scene to the clients. Depending on implementation, the client might not immediatly update its own possition, but instead let the server do the action logic.
quote:-Links to this kind of information
Sorry, don''t have any. But look at the reference section, and you should be able to find some network related articles that will point you further down the road.

There are a few that use TCP but the vast majority use UDP for everything with the possible exception of authentication. They usually build a guaranteed layer over UDP themselves, as TCP has a couple of nasties in it''s anti-netowrk congestion that can hamper performance. (BTW, TCP/IP is a protocol suite, and there isn''t really anything called UDP/IP).

According to microsoft, yes you can do massive multiplayer stuff with directplay, and No directplay is NOT peer-peer only. As of yet i don''t know of any MM''s that use dplay, and most consider it to have too much overhead to use in things like FPS''s atm.

quote:Original post by Anonymous Poster
(BTW, TCP/IP is a protocol suite, and there isn''t really anything called UDP/IP).
I think you could say UDP/IP is as well, although people selldom do that. Both UDP and TCP are built upon the Internet Protocol (IP).

quote:..., and No directplay is NOT peer-peer only.
Just for the record, I didn''t say it was p2p only. By p2p I mainly meant small scale playing. Bad expression, though



I''m using DirectPlay for my online rpg. I can''t say if it''s good for "massive" games yet, since the online peak only is 25 people so far, but I haven''t had any problems with it. I think a good ISP and server is more important than the choice between winsock and DirectPlay.



My Stuff : [ Whispers in Akarra (online rpg) || L33T WAR (multiplayer game) || The Asteroid Menace (another game) ]

My Stuff : [ Whispers in Akarra (online rpg) || L33T WAR (multiplayer game) || The Asteroid Menace (another game) ]
I thought DirectPlay was designed to only support a maximum number of players? Hmmmmm, where did I get that from?


http://www.stodge.net - the powerhouse in personal commentary
---------------------http://www.stodge.net
quote:Original post by Fistandantilus
-What kind of protocol they use? TCP/IP? or maybe UDP/IP?


In most cases UDP is used. It is generally faster and lag is not as big an issue as it can be with TCP. But using UDP is not without problems. You have no guarantee that packets will reach it''s target, nor do you have any guarantee they will reach the target in-order. So you will have to build a system on top of UDP to handle this. But if you make a good design, it is managable. For instance, you could design a scheme where not all packets are required to reach the target and where order doesn''t matter, then those packets can be forgotten about once send, while other packets are required to reach the target and/or in-order. This way you cut down on the number of packets you need to track.

Other considerations when chosing a protocol, is packet size and speed. UDP packets are smaller in size and has a smaller overhead than TCP, so this helps. TCP also tend to be a slow starter while UDP is not.

quote:-What kinds of messages are sent to the server and what kinds of messages are sent to the client?


This depends entirely on the type of game, but log in/out information, authentication and update data - you should use TCP for this. Gameworld specific data, such as movement data, object creates/destructions, chat, etc. Use UDP for this.

Only use TCP while the initial connection and authentication - and possibly game/data updates as well - is being established. Once all that is done, disconnect the TCP connection and continue with using UDP.


Malty
For the record...DirectPlay has a GUARANTEED and NON_GUARANTEED option for its packet sending. So I believe that hints that it uses both TCP and UDP protocols.
There is no point in doing anything at all, you'll die pretty soon anyway.
No, DirectPlay only uses UDP. It just implements some additional ack logic for the guarantueed delivery packets.

cu,
Prefect
Widelands - laid back, free software strategy
Prefect are you sure?

I have taken this text from the SDK 8.0 doc:

"DirectPlay network service providers support communication over TCP/IP, IPX, modem, and serial links"

This topic is closed to new replies.

Advertisement