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 Professional Discussion / My test server.exe always crashes. Any idea why? [MultiSync]

Author
Message
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 3rd Jul 2016 05:11 Edited at: 3rd Jul 2016 05:17
Hello everybody.

I tried Multisync example to host a multiplayer session.
But somehow the exe always crash on startup.
What did I do wrong? I even port-forward the port 8888

My local IP: 192.168.1.101
My open port: 8888
My remote IP: 60.49.73.217

It crashes when I used these:


It doesn't crash when I use this:


But if I wanted to host online multiplayer, I had to use the first method, right?

Any idea on how to fix this?

The codes. It's the same Multisync demo code:
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 9th Jul 2016 11:44
What do we need to use as a host for the ip$ part of this command? Supposing we want to host over the internet?


Is is the internal IP? 192.168.1.101
Or is it the external IP? 60.49.73.217
Or is it the combination of internal + port? 192.168.1.101:8888
Bio Fox
19
Years of Service
User Offline
Joined: 11th Nov 2004
Location: The BioFox Bunker
Posted: 10th Jul 2016 01:35
I'm not sure you can have the port in the IP address like that. I'm actually working with multisync right now and I call Net Host like this



and Net Connect like this



I've found that you cannot run the server and Player One in the same exe. They must be separate programs. So run a server exe with Net Host and then in the regular program connect to your own IP with 127.0.0.1 .

Every other computer will need to connect using 192.168.1.X . As far as over the internet is concerned, look into virtual LANs like hamachi. I haven't tested it, but it's worked with other games.
BioFox Games
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 11th Jul 2016 11:44
I turns out I'm probably behind CG-NAT. If this is true, then the ISP probably did not open the port that I specified, leading to inability to host anything.
Probably can use Hamachi.

One more thing:
Let's say if we want to host multiplayer game over the internet using DBPro native multiplayer commands....
Anybody knows what we should put into 'Address Data' part of this command?

Help file said if you connect by TCP/IP the Address Data should be an IP and Url Address.

But what does that mean?
Is is the internal IP? 192.168.1.101
Or is it the external IP? 60.49.73.217
Or is it the combination of internal + port? 192.168.1.101:8888

I can't test this myself due to the aforementioned problem. Anybody knows?
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 12th Jul 2016 03:19 Edited at: 12th Jul 2016 03:21
OK, just ran some testing to verify all this. Here is what I do:

Server PC - set static LAN IP (192.168.1.2), add TCP exceptions to the windows firewall on port 8000

Router - set port forwarding (port 8000) to the server PC LAN IP

Run an instance of the exe in host mode on the server PC - use multisync commands "net set port 8000" and "netstatus = net host(10)" >> First time you run it, Windows will probably pop an alert that windows firewall has blocked some features do you want to allow -> yes.

Run an instance of the exe in client mode on the server PC via LAN - use multisync command "netstatus = net connect(ServerLanIP$)" (just an IPv4 address "192.168.1.2")

Run an instance of the exe in client mode on a remote PC (laptop tethered to cell phone hot spot as separate network) - use multisync command "netstatus = net connect(ServerWanIP$)" (just an IPv4 address "66.69.229.192")

You end up with 2 clients connected to the server as seen here:



hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 12th Jul 2016 11:41 Edited at: 12th Jul 2016 11:48
I see, thanks.
I missed that "net set port 8000" command on MultiSync. I'm an idiot
Do we actually need to connect as a client to the server PC via LAN for the server to work on internet? Or it doesn't matter?

Also, anybody knows what we should put into 'Address Data' part of this native DBPro command?

Help file said if you connect by TCP/IP the Address Data should be an IP and Url Address.
But what does that mean?
Is is the internal IP? 192.168.1.101
Or is it the external IP? 60.49.73.217
Or is it the combination of internal + port? 192.168.1.101:8888

I wanted to try DBPro native commands too because of the advantage of 'sessions' or GameName.

Contrary to MultiSYnc, with DBPro native commands, if we connect to the server IP/LAN, DBPro lists all the server that is on the network as GameName/'sessions'.
So, for people like me that can't host due to CG-NAT, if we use Hamachi, then all people that connects to that particular Hamachi network can find all the servers that runs in it.
That should solve the problem or searching for 'lobbies'.
Probably.

Here, I included an example of a chat server/client using DBPro native multiplayer commands. Please try to see what needs to be put in SET NET CONNECTION address data for the server to work over the internet

Attachments

Login to view attachments
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 12th Jul 2016 19:04
No you don't need a local client, it just demonstrates that both local and Internet can connect to same host at same time

Login to post a reply

Server time is: 2024-04-25 13:46:58
Your offset time is: 2024-04-25 13:46:58