Multiplayer Api Wrapper

Started by
9 comments, last by Azrael 24 years, 1 month ago
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?
Advertisement
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.

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.
I have a copy of the G3D netplay files that I can send you if you like, the zip is quite small
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
============================Daniel Netz, Sentinel Design"I'm not stupid, I'm from Sweden" - Unknown
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
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.

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.
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
Nick V. CaldwellMIT co ''03nvc@mit.edu
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.

This topic is closed to new replies.

Advertisement