Jump to content

  • Log In with Google      Sign In   
  • Create Account


Multiplayer Api Wrapper


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 Azrael   Members   -  Reputation: 128

Like
Likes
Like

Posted 02 March 2000 - 04:06 AM

Ok. Im pretty sure this is a FAQ in this forum, but its worth it so ill shoot it anyway. Im a game programmer but im a newbie in comunications Im aware of concepts as lag, latency and protocols, but thats about it, I dont know about comunication layers, Now I know that there are two major APIS one is direct play and the other is winsock , I also heard that there is a http based one. but the question is, Is there a easy to use wrapper around? for this api''s? so I can implement TCP/IP comunications in my program? without too much hassle?

Sponsor:

#2 DarthSpanky   Members   -  Reputation: 122

Like
Likes
Like

Posted 02 March 2000 - 07:23 AM

DirectPlay is the easiest to use. If ease of use is your main concern, my suggestion is to definately use DPlay.

There is a DPlay wrapper in the engine source code download at www.genesis3d.com. You can see the wrapper in use in the GDemo1 source download at the same site. The code is not optimized, but it works.

#3 Azrael   Members   -  Reputation: 128

Like
Likes
Like

Posted 02 March 2000 - 10:51 AM

Thanks! Actually that is what im looking for, if I have the source code I can probably optimize it myself, with some luck.
One last thing the genesis3d download is too big, and is not very useful to me, (im not working on fps) since this code is probably just a few kbs in size, could you be so kind to send it to me by email? german_cons@yahoo.com

I will really apreciate that, im using a modem for my connections and 22 megs are way out of my reach.

#4 Effigy   Members   -  Reputation: 122

Like
Likes
Like

Posted 02 March 2000 - 12:22 PM

I have a copy of the G3D netplay files that I can send you if you like, the zip is quite small

#5 Spiff   Members   -  Reputation: 122

Like
Likes
Like

Posted 02 March 2000 - 08:48 PM

Isn''t DirectPlay based on Winsock, since Winsock is a part of the TCP/IP protocol stack?

Daniel Netz, Sentinel Design

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

#6 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 02 March 2000 - 09:51 PM

Well, I''m not sure I could recomend Directplay for anything. I am fairly proficient at winsock now, and I might be inclined to say that it''s an easier API to learn. Directplay is a poorly documented API at best, while Winsock is strongly documented. If you are looking for a simple network interface, and MFC is an option, you can use their CSocket or CAsyncSocket classes (which have very good documentation). In my opinion the MFC socket classes are MUCH easier to learn and start using than DirectPlay.

If MFCs are not an option, you can still use winsock without, and sockets are almost identical to reading / writing to a file. If you want a good Winsock book, Winsock2 by Lewis Napper is a very good intro to Winsock, progressing on into some talk of scalable server design and advanced winsock topics.

It''s all dependant on what you need to do, how many clients you have, and the types of connections. Directplay might work well for some instances, but I found that the more I learned about it, the less I knew. Confusing would be a compliment to that API.

Well, hope that helps,
Jon Stelly

#7 DarthSpanky   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 March 2000 - 02:49 AM

To each his own.

Just a couple things to note, however.

1. DPlay was made for games.

2. The documentation is limited because there really isn''t much to document. It is a pretty simple, fairly high level API.

#8 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 03 March 2000 - 04:13 AM

DPLAY has extensive documentation. Not to mention the fact that it has about 1000 more features than winsock. Only probly is the sharp learning curve.

#9 DeVyle   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 March 2000 - 05:26 AM

And anything you can do in C++ you can do in assembly...even more. I tend to agree that DirectPlay is better. Why waste time on Winsock when all those nifty features are already available. Jusy my 2c.




Nick V. Caldwell
MIT c\o ''03
nvc@mit.edu

#10 SiCrane   Moderators   -  Reputation: 9387

Like
Likes
Like

Posted 03 March 2000 - 06:42 AM

quote:
Original post by DeVyle
And anything you can do in C++ you can do in assembly...even more. I tend to agree that DirectPlay is better. Why waste time on Winsock when all those nifty features are already available.

Direct play is platform specific.
It has really ugly bloated packets.
Just my two cents.

#11 DarthSpanky   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 March 2000 - 08:53 AM

Anon - What learning curve?

SiCrane - You are absolutely correct. Azrael doesn''t want hassle however, and in my opinion the best way to lose the hassle is to use DPlay. If you want a portable application obviously DPlay is a bad choice. If you want TONS of people to play the same game, obviously DPlay is not the best choice.

If you want to easily add multiplayer functionality to a game that will only run on the Windows platform anyway, with a reasonable amount of players, with hardly any hassle, then DPlay is the way to go in my mind.

Azrael - I PERSONALLY found DPlay a lot easier to understand than anything else. Looks like not many are on my team though. My ''new'' advice is to take a look at the different implementations of sockets and DPlay. See which one makes the most sense to you, and use that one.

Good luck with whatever you are doing, and have fun.






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