Archived

This topic is now archived and is closed to further replies.

Networking in Massive Games

This topic is 5501 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.


Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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




Share this post


Link to post
Share on other sites
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) ]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?[quote]

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

Share this post


Link to post
Share on other sites
quote:
Original post by Fistandantilus
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"


Yes, TCP/IP generally refers to a suite of protocols, including UDP. DirectPlay is implemented wholly with UDP (at least when using the TCP/IP suite of protocols, obviously, IPX, modem and serial links are done differently...)

If I had my way, I''d have all of you shot!


codeka.com - Just click it.

Share this post


Link to post
Share on other sites
Have anybody actually TESTED this?

When I run the server I check the traffic using Performance Monitor in Win2K, and according to that there are both TCP and UDP packets being sent and received. Of course I''m trying to send as many packets as possible using the fast unreliable method, and only the important ones with DPNSEND_GUARANTEED.

In the DirectX 8.1 documentation it says

"It [TCP/IP] uses User Datagram Protocol (UDP) packets for nonguaranteed messaging and TCP for guaranteed messaging"

This doesn''t mean DirectPlay uses TCP, of course, because at another location it says:

"Because the DirectPlay and RTP protocols are both layered on top of the UDP protocol, their parsers may conflict. You should disable the RTP parser when analyzing DirectPlay traffic, and vice versa."

This hints that DP is a whole new packettype which also (as TCP) is built ontop of UDP...

Of course nothing of this is important since you should make your own decision anyway... and it''s kinda off-topic too


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

Share this post


Link to post
Share on other sites
quote:
Original post by stodge
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


I believe that up until DX8, DirectPlay had a maximum number of players. If my memory serves me correctly, the maximum used to be 64.

Trying is the first step towards failure.

Share this post


Link to post
Share on other sites