🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Heh, Sweeney's opinion on DirectPlay

Started by
33 comments, last by civguy 23 years ago
quote: I'm currently running a DPlay MMORPG server off my Win2k Pro box and there have been no problems


I can´t connect to your server..Thats a problem..Maybe not a DP problem though...

Btw Kevin..Why do you say that the Service Provider is a MFC problem ? The docs do not mention this..





Edited by - granat on April 20, 2001 3:11:39 AM
-------------Ban KalvinB !
Advertisement
quote: "This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album


Staffan..please get rid of that communist bullshit...
-------------Ban KalvinB !
quote: Original post by granat

Staffan..please get rid of that communist bullshit...


lol Do I have to? I rather like it I''m sure I could come up with a new one though, like...um...something less "red". Like, "With our silence we vote for continuation" - which is just a tad revolutionary and not at all communistic

"This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album
"I think this is what you meant, but just to clarify, everything that is offered in DP is possible in sockets because DP is built on top of Winsock" -
Correct. Its built on UDP, everything else is DP''s own.

"I learnt the basics of using unix domain sockets (sockets, as in winsock) with tcp/ip in, hmm, less than two hours" -
Exactly. Its BASICS. You definetely can learn basic sockets in less than 2 hours; As you start going deeper you''ll meet all kinds of crazy stuff.

"DirectPlay is not portable!!! Ek, so don''t even consider it" -
True, its not. So is WinSock2. So is DX.

"TCP is packet based, so is UDP" -
TCP is "stream" based (as oppose to "packet" or "message" based UPD). It means, data arrives not in one chunk, but as "stream" of chunks. One has to glue them together, etc.
DP is "message" based - which is perfect for games. You send 20 bytes in one chunk, you receive 20 bytes in one chunk.

Cheeeeers!
Meduzza

I had the server down for the night it'll be back up in a couple hours.

The Dialog boxes that are used in dpconnect.cpp use MFC. If you want to get rid of them you need to figure out how the user input is collected and used and then modify the source to do it automatically.

I made a few changes to the orginal dialogs but I find them handy since I can issue a "destroy(hwnd)" from the server for giving wrong information without making them wait for alot of initialization.

Ben
http://therabbithole.redback.inficad.com

Edited by - KalvinB on April 20, 2001 11:43:15 AM
quote: Original post by Meduzza

"I learnt the basics of using unix domain sockets (sockets, as in winsock) with tcp/ip in, hmm, less than two hours" -
Exactly. Its BASICS. You definetely can learn basic sockets in less than 2 hours; As you start going deeper you''ll meet all kinds of crazy stuff.

"DirectPlay is not portable!!! Ek, so don''t even consider it" -
True, its not. So is WinSock2. So is DX.



And what exactly is this crazy stuff you speak of?


Right, and therefore I don''t use DirectX (directly). What''s new in WinSock2 anyways? What differs WinSock2 from WinSock? Cause if there are no vast super-improvements I can only see downsides in making and promoting something unportable such as it.

"This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album
Just one example: make asyncroneos sockets. There are at least 3 ways to do it and none is easy. You''ll probably want to have a socket running in a thread (this is a Unix way). You''ll probably want to pass data from the main thread to a socket in its own thread. Same goes with receiving. That means you''ll have to manage send and receive buffers and you''ll have to make sure you do it in a thread safe way. Or, you can use WinSock2 specific features that involve Windows specific stuff and makes things non-portable.

Etc.
I can''t quite see the problem, elaborate a bit more? (I don''t your language, so please forgive me for the inconvinience)
Why would you want to pass data from the main thread/process (forking is just as fine - easier but more resource consuming) to your child threads/processes? (You could set up a pipe or a PF_UNIX/PF_LOCAL socket between them though )

The craziest thing I ever tried doing was a single-threaded synchronous I/O tcp server. Which was indeed a bit confusing at first (select()...FD_ISSET()...ah!) but not so confusing that I''d qualify as hard or crazy.

"This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album
Well, I am not a Unix guy so dont you pipe me
OK, let''s say you have a socket that is connected to let''s say Napster. There''s also some UI happening. At any momemnt data may arrive from Napster and at any moment you may want to send it. As you know, regular "send" and "recv" can block. That is unacceptable, because UI will block too. To solve it, you''ll have to use some kind of async sockets. I usually put socket in a thread and have 2 self-growing and thread safe buffers: read buffer and write buffer. At any moment main thread can read "read buffer" and socket thread may write into it. At any moment main thread can write into a "write buffer" and socket thread may read it. (That''s why one has to make this thread safe). Makes sense?
There''s a company that''s converting all the directX functions to Linux. And there are already Windows conversions for Linux. Compatibility doesn''t have to be a problem over a few months.

www.persistentrealities.com for Inline ASM for VB, VB Fibre, and other nice code samples in C++, PHP, ASP, etc.<br/>Play Yet Another Laser Game!<br/>

This topic is closed to new replies.

Advertisement