Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Barnski's Winsock Plugin help

Author
Message
Papa Stiffy
17
Years of Service
User Offline
Joined: 22nd Sep 2007
Location:
Posted: 24th Aug 2011 07:02
Okay, I've installed and setup the plugin and it is working properly, however I am having considerable trouble trying to figure out how to send and receive packets. In fact, I'm having trouble figuring out how to properly connect two computers as well...

I am creating a fast shooter so I will need a UDP connection. Unfortunatly, I cannot seem to find any examples using the plugin and the thread seems to be dead. Is there anyone on the forum who can help me get started with Barnski's Winsock Plugin? Or perhaps at least someone who could point me to a better DGDK plugin that utilizes UDP connections and has better support/examples?

I apologize I cannot contribute any code atm to be looked at, I am utterly lost. I have created multiplayer games before using DBP years ago so I understand the concepts, just the plugin is hard to learn when there is zero support and zero example code...

Thank you!
Papa Stiffy
17
Years of Service
User Offline
Joined: 22nd Sep 2007
Location:
Posted: 25th Aug 2011 08:14
Sorry to bump this but it has been a day without a response and I still can neither find a new UDP library nor get Barnski's Winsock Plugin working properly.

Does anyone have a better solution than Barnski's for UDP within DGDK or can anyone tell me how to make a simple UDP connection/send message with Barnski's?

The help would be greatly appreciated, I'm stuck at the moment...
miso
14
Years of Service
User Offline
Joined: 16th Jun 2010
Location: Budapest, Hungary, 127.0.0.1
Posted: 25th Aug 2011 09:57 Edited at: 25th Aug 2011 09:58
Computers do not connect using udp. You just send data to an ip and port. UDP is connectionless.

I don't know the gdk version, but I made working programs in dbpro using barnski's winsock.

The method I used in pseudo for sending:


For receive, I used that method:


Sorry for the pseudo, but proper c++ code is beyond my current knowledge. I belive that Barnski's winsock works the same way as in dbpro, so it may help you.

No place like 127.0.0.1 .
puppyofkosh
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location:
Posted: 26th Aug 2011 23:36
Quote: "Does anyone have a better solution than Barnski's for UDP within DGDK or can anyone tell me how to make a simple UDP connection/send message with Barnski's?
"


I don't have a solution for you, but you could check out enet, Beej's Guide To Network Programming (although this is all written in C), and there is always the MSDN winsock documentation.
Papa Stiffy
17
Years of Service
User Offline
Joined: 22nd Sep 2007
Location:
Posted: 27th Aug 2011 18:15 Edited at: 27th Aug 2011 18:15
Hey, sorry it took me a few days to reply, this hurricane on the east coast has had me running for a few days now. Anyway, thank you for the replies!

@miso - Thank you, I did not realize that UDP was connectionless and after reading further into it that makes sense now. Although I was hoping for code, thank you for the model anyway it has helped.

@puppyofkosh - I have looked into enet before, and if I cannot get Barnski's working I will try that instead. The documentation seems much better. Do you happen to have any experience with enet? What did you think?
puppyofkosh
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location:
Posted: 27th Aug 2011 18:55
Quote: "@puppyofkosh - I have looked into enet before, and if I cannot get Barnski's working I will try that instead. The documentation seems much better. Do you happen to have any experience with enet? What did you think?
"


Sorry, I don't. I've only read about it on other forums, but as far as I've read & seen it's stable and relatively easy to use. You might want to take a look at the Multiplayer and Network Programming board over at gamedev.net too.
miso
14
Years of Service
User Offline
Joined: 16th Jun 2010
Location: Budapest, Hungary, 127.0.0.1
Posted: 28th Aug 2011 17:20 Edited at: 28th Aug 2011 17:22
Your welcome. I suggest this article to read, short, and covers all the udp basic techniques good for games. Regardless of your choice (Barnski's winsock/Enet/Other), it provides very useful information about udp networking.

Edit: forgot the link:

http://trac.bookofhook.com/bookofhook/trac.cgi/wiki/IntroductionToMultiplayerGameProgramming

No place like 127.0.0.1 .
Papa Stiffy
17
Years of Service
User Offline
Joined: 22nd Sep 2007
Location:
Posted: 30th Aug 2011 01:12
Thank you both for the help. And miso I read through that link it was very helpful as to the structures of multiplayer programming. I finally got some extra time last night to work on Barnski's plugin, and after some more frustration decided to download everything he had on the site, in hopes one would have some tutorials. Good news is, a DBP download had some decent sample code in Basic.

I've been working today to translate between basic(a language I knew years ago) and c++ so I should be able to slowly piece this project together. If anyone else has some helpful (non-psuedo) code for Barnski's plugin it would be much appreciated. Thank you again for the help!

Login to post a reply

Server time is: 2024-11-19 08:40:29
Your offset time is: 2024-11-19 08:40:29