Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


Winsock VS DirectX


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 SPAR   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 March 2000 - 07:07 PM

I am working on a multiplayer internet game and am wondering whether using Winsock functions or DirectX is faster/more reliable? I know the basics of implementation, but I would just like to know which is faster for communication via TCP/IP? SPAR1

Sponsor:

#2 Spiff   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 March 2000 - 07:18 PM

Winsock is low-level and therefore faster, DirectPlay is more high-level and requires less programming, but it may not be as flexible as you would like it to be.

I don''t think that DirectPlay (from DX7) is capable of maintaining mass online games or fast realtime FPS mplayer games, but for strategy games or similar when you don''t require really fast communication, it should be fine.

Isn''t DirectPlay mostly based on Winsock?

============================
Daniel Netz, Sentinel Design

"I'm not stupid, I'm from Sweden" - Unknown

#3 Geradian   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 March 2000 - 07:35 AM

I am pretty sure DirectPlay uses Winsock.

#4 SiCrane   Moderators   -  Reputation: 9627

Like
Likes
Like

Posted 09 March 2000 - 04:40 PM

Both Winsock and DPlay implementations of the same protocol tend to have similar latency, but overall bandwidth is greater with DPlay, especially when creating a connection. Reliablility is pretty much the same as they work on the same network protocols.

Edited by - SiCrane on 3/9/00 10:55:55 PM

#5 SPAR   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 March 2000 - 06:53 PM

When you say the overall bandwidth is bigger, do you mean that you can send more information or that it takes up more of the resources?

#6 Jeff K   Members   -  Reputation: 122

Like
Likes
Like

Posted 10 March 2000 - 03:01 AM

More resources. I wrote a simple DPlay program to test this.

In this small case a client connecting sends 480 bytes and receives 772.

When sending messages over UDP, the messages are prefixed with the origin and destination player IDs - a total of 8 bytes.

When sending reliable messages over TCP, there is also 2 bytes for the packet length, 2 bytes of something else, and 16 (!!!) empty bytes. (a GUID?)

Setting DPSESSION_DIRECTPLAYPROTOCOL sends more packets, I didn''t bother counting.

#7 SPAR   Members   -  Reputation: 122

Like
Likes
Like

Posted 10 March 2000 - 07:27 AM

cool thanks, that''s what i wanted to know!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS