Sign in to follow this  
KDSBest

WinSock vs. DXPlay

Recommended Posts

Hello, i have a question. What of these options are the best? Winsock Server/Client DXPlay Server/Client I have written an Third Person Shooter, but without network play. I want to add network play but i don't link DXPlay. Can i solve it with my own Winsock Server/Client Application? Thx for answering;) PS: I publish the game for free if it is finished :). Maybe with source.

Share this post


Link to post
Share on other sites
IMO, definitely go with winsock. There are a few reasons for this:

(1) DPlay is old and deprecated. It hasn't been updated in years.

(2) DPlay has a fair amount of overhead due to all of its stuff running on top. Most games don't need *all* of these, and pings/network responsiveness is more important.

(3) DPlay is just a wrapper around Winsock to begin with.

In reality, Winsock is pretty easy to use, and you should be up and running in no time. If you really want to use an overlying API though, try Raknet. I looked into it before, and it's pretty good - it's free, too.

Share this post


Link to post
Share on other sites
This depends on many things. I have looked at DirectPlay briefly and it looks like it offers a very nice level of abstraction between you the developer and the comms elements.

I finished reading 'Programming a Multiplayer FPS in DirectX' by Vaughan Young recently and he uses DirectPlay for P2P communications which is insanely easy and abstract. The implementation of a client/server architecture using DirectPlay looks nearly as simplistic, and unless you know what it takes to create the layer of abstraction required for good sockets programming I would take advantage of what has already been implemented for you in DirectPlay.

Alex.

Share this post


Link to post
Share on other sites
I have my own Server/Client classes written a quite long time a go.

It was a chat server for a single community and it works quite nice.

The only thing is, i want to learn DirectPlay.

I thing i buy the book you have read, this is maybe a good start.

Maybe i found in the book something for my third person shooter. :)

THX for answering

Share this post


Link to post
Share on other sites
We have programmed our game using DPlay. Its easy to work with but it lacks some features. It earned a bad reputation on its early days but the latest version was fine. MS dropped support on it because major houses preferred to go for its own solutions but if you don't want to waste time implementing your own network system, go for it.

Anyway... now I would go for Raknet... it has improved a lot.

Luck!
Guimo

Share this post


Link to post
Share on other sites
I think, personally, that winsocks is phenomenally fast. I have experience with it in my line of work. It is truely the creme de creme choice for ultra fast application connectivity.

Direct play on the other hand is really nice for all of the abstraction that it offers, even if it is a little slower. As far as I know, it provides voice mapping features, as well as a built in chat device. That eliminates a LOT of work from your task list.

I would say your best bet, if you are super concerned about performance, would be to make a class which wraps all of the DirectPlay features that you need. Wherever you get less than satisfactory performance in your multiplayer modules, replace some of that code with your own winsocks implementation.

I suggest this for three reasons:

1. Winsocks is extremely difficult to use if you have never used a low level socket programming library before.

2. As a general rule, you should optimize only where necessary. I have found that most libraries that my programming buddies refer to as laggy or slow is actually quite satisfactory if implemented properly.

3. You will save yourself time and energy by starting with DirectPlay and then scaling backward to winsocks where you feel DirectPlay is too slow.

Don't worry about it not being updated in a while, they only update stuff that needs to be updated.

I hope this was helpful. :)

Share this post


Link to post
Share on other sites
Quote:
Original post by circlesoft
(1) DPlay is old and deprecated. It hasn't been updated in years.

Just to add to Dustin's list... Microsoft strongly recommends against using it to develop new applications.

From the bits-n-pieces I've picked up over the years, I gather that DP fails on various security and compatability (e.g. firewalls etc..) fronts.

If you have old code kicking around for DP then by all means continue to use it, but it doesn't seem to make sense to start writing new code with it.

hth
Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this