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.

DarkBASIC Discussion / Built in multiplayer commands

Author
Message
pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 17th Nov 2009 04:48
Alright, I began working on multiplayer again and I am determined to get it working (mostly because I don't understand dll's). I'm having trouble understanding a few things and I'm getting a few bugs.

1) When your the host and you try to recieve something from another player and want to know who it was from with the message from command, it returns your name.

2) When there is a third player created, player 2 can't see or even recognize that player 3 is there and vice versa but they can both see the host and the host can see both.

3) I don't really understand the get net message command. I got it working but I'm not really sure how to tell what message I'm recieving, like if I send multiple messages at once.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 17th Nov 2009 12:46
Have you seen this?...

http://forum.thegamecreators.com/?m=forum_view&t=59539&b=10

It might be of some help to you.

TDK

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 17th Nov 2009 14:10
What don't you understand about Dlls? Maybe someone can help. Its not too complicated;

Download Benjamin's Multisync dll,

Extract the dll into the plugins/user folder where Dark Basic has been installed

Run through a few of the example tutorials / the well explained reference to grasp how sending packets over the net works

Experiment on your own until you get two cubes moving around together.
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 17th Nov 2009 17:01
Quote: "Extract the dll into the plugins/user folder where Dark Basic has been installed
"


Wrong board ruccus. He can use the multisync dll, but to do it he has to use load dll and call dll commands.

New Site! Check it out \/
pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 18th Nov 2009 05:11
haha. Everything in your tutorial I understand. I'm just trying to figure out what seems everyone has a problem with WAN with built in commands. I can get LAN working, its just WAN, Imma see what i can do.
pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 18th Nov 2009 05:55
haha alright got multiplayer working pretty good and names too. I just need to see if it works over WAN so if anyone would be kind enough to download the exe attached to this post and connect with me to see if it works

Here's a pic of four players on one computer :

Attachments

Login to view attachments
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 19th Nov 2009 00:49
Multi-play over the WAN is a problem only because the built-in commands were not designed to do it. The original intention was that they were only for network-based games running on the same sub-net.

The reason they don't work over the internet is that the commands use DirectPlay and there is no way to select which port on your router you want to use.

Experiments I did when writing the tutorial suggest that random ports are used so you can't just use one which happens to be chosen and hope the same port will be used next time. It won't.

So, for it to work, you would have to get all players to disable any software firewalls and open every port on their routers - and you would need to be rather stupid to do that. I wouldn't anyway...

The external addons people have created to do the job have one important addition to the built-in commands... port selection. You select the port number (which it sticks to), make sure that port is open on your router and away you go.

There really isn't much else you can do.

TDK

pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 19th Nov 2009 01:08
Haha looks like I'm going to multisync then lol

Login to post a reply

Server time is: 2024-03-29 13:42:44
Your offset time is: 2024-03-29 13:42:44