Jump to content

  • Log In with Google      Sign In   
  • Create Account

Winsock or DirectPlay or... ??


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
10 replies to this topic

#1 chr1701   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 February 2000 - 10:22 PM

Hi all, first i think i should mention that i have never done anything concerning multiplayer-programming, but... when i read the threads here, i get the impression that people seem to use winsock and not directPlay. Why? Chris.

Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9598

Like
Likes
Like

Posted 02 February 2000 - 04:29 AM

My personal answer to that is that Winsock code ports more easily to other platforms. Actually much of my mult-player code is done in berkeley sockets and then moved to winsock.

#3 Spiff   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 February 2000 - 02:28 AM

I''m not sure about that either but it seems like DirectPlay is good in mplayer games where there isn''t much gamestate data to update, like 2d games, turnbased games and so on.
Winsock seems more powerful when writing online multiplayer games and fast 3d action games. I don''t think I''ve ever played a FPS using DirectPlay.

Daniel Netz, Sentinel Design
http://welcome.to/sentineldesign

#4 a2k   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 April 2000 - 06:51 AM

can we get more opinions on this? i''m thinking of doing this too, but just wanna hear about majority and stuff.

is winsock to directplay as
opengl is to direct3d?

how "difficult" is network programming compared to say, direct3d, cuz, most books i read say that direct3d is the HARDEST component of directx, which leads me to believe that directplay isn''t too bad. i''m planning of coding a 3d realtime racing engine, so maybe winsock would be better? ideas please!

a2k

#5 pingz   Members   -  Reputation: 128

Like
Likes
Like

Posted 21 April 2000 - 07:00 AM

> is winsock to directplay
> as opengl is to direct3d?

no.... Winsock is Microsoft''s impementation of the Sockets API used in unix systems. DPlay sits ontop of that.

#6 gimp   Members   -  Reputation: 142

Like
Likes
Like

Posted 21 April 2000 - 12:24 PM

Here is a really easy answer:

Look around at the servers running the multiplayer games at the ISP etc. Their almost all linux. If you want your server process running on those box''s you make sure you use something that can be ported to linux, sockets can, direct play can''t(without writing an exact clone of directplay ...ugh)

It a decision you make about your target audience. Are you writing games for mac or windows? Probably windows so more people play them, same thing with servers. We generally write the server code portable so the ISP can run their linux box''s and the lanparties can run thir NT box''s (in general)

Directplay limits you to windows box''s.

chris

#7 a2k   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 April 2000 - 01:03 PM

hey, i actually went through a 19 page tutorial covering winsock, and i thought it was pretty easy. too good to be true? i mean, all it consisted of was:

setting up a socket
setting up host
listening
receiving data
sending data

which was maybe like only 15 lines of code that i had to know. (i mean, i know i''d have to put them in the right logical order to get it working, but are those generally the only commands that i''d need to know for winsock? cuz if so, this winsock programming is like way fun!!)

anyway, tell me all about it. are my hopes too high?

a2k

#8 md2ge   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 April 2000 - 07:09 PM

Winsock really is very easy to use, I read a whole book about it but many things I learned I will probably never use in a game.

Winsock and DirectPlay can''t be compared because they are different things, is like comparing a 3D API like OpenGL or Direct3D with a game engine.

If you want your network code to have the possibility of being ported to other non-windows enviroment you should go with winsock. If your game will run on windows only then it''s your choice. Many things that DirectPlay does you''ll eventually need to implement yourself, like connection acceptance and rejection, player management, etc. If your game will run on windows only I''d say go with DirectPlay, save yourself some headaches =) unless you''re going to have a lot of players and you want to optimize your code to the fullest.

Rick

#9 iwasbiggs   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 April 2000 - 03:57 PM

If your game already uses Direct3D or DirectDraw, it''s not really portable anyways, so why not just take advantage of what DirectPlay has to offer?

#10 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 22 April 2000 - 04:08 PM

I use all of DirectX EXCEPT for Direct Play. It''s just too frickin hard to understand. Yes I even wrote my own Direct 3D Immediate mode drivers. But Direct Play? Forget it. I use "winsock" and good old CAsyncSocket every time.

-Michael

#11 Dak Lozar   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 April 2000 - 05:34 PM

I use WinSock or straight Berkeley sockets for my network coding ... but, I have to admit that DirectPlay does have it''s place in peer-peer games. I like the ability to hand off "server" responsibilites to another play in the instance of the current "server" player dropping. But other than that, I suggest WinSock for its ease to code and for portablility.

As for using DirectPlay because your allready using Direc3d isnt really a valid point, for this reason. You should should have each "piece" of the engine modular so that you can port without much fuss.

David "Dak Lozar" Loeser




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