Can't connect from another computer lan/online?

Have any questions or problems in making your game, subscribing and/or using our software? Post here.
Forum rules
Make sure you are using the newest version. This can be downloaded at the top of the site via the "downloads" link.

Use a very good subject. "Problem" or "Help" are unacceptable titles.

Use the search feature before posting a question, as the answer is probably already here.

Subscript out of range error 9: This is a generic error, and we'll need way more information than that to figure out the problem. If you get this, strongly consider following the instructions of submitting your project through the Submit Bug feature within the editor.
User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Can't connect from another computer lan/online?

Postby Danny » Fri Jul 22, 2016 10:19 pm

I want to test the online features from another computer. How would i go about doing this?

I built my game, installed it on my computer, then did the same on my girlfriends computer, i then ran both games and hosted the game from mine, i then entered the ip address in my girlfriends laptop and it wont connect.

I tried using 127.0.0.1 with port 10 to connect (Though the Wiki did say you can't use it) but was work a try. I tried entering the ip address of my home network (The Lan IP) and that didn't work, i disabled all firewalls and tried again, even tried entering my public IP address, entered the IP that showed up in CMD when i entered ipconfig, still not connecting.

1) What IP address is the host suppose to use?

2) What IP address is the client suppose to use?

Also is it possible to play the game with someone online? Like say from the Uk to the states? If so would i need a website with a server or is it possible to connect directly to the host via their IP and Port number?

Thanks


Edit: Okay even went as far as to disabling my modems firewall and still nothing :lol:

Edit 2: Disabled Windows Defender & Antivirus and still nothing. Tried varied ports and still nothing. Simply unable to connect the game from one laptop to my laptop using the home network. Setup port forwarding in the modem to. I've done everything i personally can think of now.
Last edited by Danny on Fri Jul 22, 2016 11:46 pm, edited 1 time in total.
Reason: Automatically merged double post.

User avatar
JimmySterylian
001 Fanatic
 
Joined: Tue Jul 29, 2014 2:28 pm
Location:  ­ 

Re: Can't connect from another computer lan/online?

Postby JimmySterylian » Sat Jul 23, 2016 3:17 am

The 127.0.0.1 address is used to loop back the connection from one instance of the game to another on the same computer. When you're playing the game on twp separate computers, you can use the 127.0.0.1 IP address to host a session but clients should instead use the IP of the PC they want to connect to. And once again, the wiki explains that in more detail :-P
Image

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Can't connect from another computer lan/online?

Postby Danny » Sat Jul 23, 2016 11:17 am

You can use the 127.0.0.1 IP address to host a session but clients should instead use the IP of the PC they want to connect to. And once again, the wiki explains that in more detail :-P


No the wiki doesn't explain anything in more detail, in fact the Wiki hardly as anything in more detail. It's very limited with the knowledge it shares. Only gives you a slight "Over-view" Not only that but i also searched the Wiki and it didn't help.

During the development process, you should use the IP address “127.0.0.1” for the purposes of hosting and for connecting. This is also called “localhost” and is used to essentially loop-back the connection from one instance of the game to another on the same local machine. When the game is ready, you can continue to use that IP address for hosting, but clients should instead use the IP address of the other networked computer.


I also already knew what 127.0.0.1 did. I tried every single IP address there is. My Lan IP, My Public IP, disabled all security firewalls, the lot i can not get this game working from one computer to another. I already said all the things i have done in to get this working, i already stated i had tried 127.0.0.1 even though 001 said not to, i know what a loopback is, i know what my LAN ip address, i know my Public Ip address, connecting VIA IP is NOT working for ME.


Edit: Even tried my computers Ip ( iPv4 address ) I can now officially say i have tried everything i possibly can, anyone got any ideas on this? Can't make a lan/online game if the thing can't connect...
Last edited by Danny on Sat Jul 23, 2016 2:32 pm, edited 1 time in total.
Reason: Automatically merged double post.

User avatar
kararty
Ultimate 001 Member
 
Joined: Tue Dec 04, 2012 1:16 pm
Location: Sweden

Re: Can't connect from another computer lan/online?

Postby kararty » Sat Jul 23, 2016 3:08 pm

You need to port forward the "port" you're using.

http://portforward.com/english/routers/port_forwarding/ - Pick your router's name and you'll get a nice guide with images explaining how to port forward.

I used google.
Mike wrote:...

Image<~~~|Get over here!

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Can't connect from another computer lan/online?

Postby Danny » Sat Jul 23, 2016 3:17 pm

Already done that. It's the first thing i did when the ip didn't connect. On phone this very minute to my ISP.

I used google.


As did i...

Edit: ISP was useless... so am stuck and it doesn't work :/ Port forwarding as already been put in place. Ideas anyone? Got to the point where everything i know as not worked...

The "Connect Server" event as the IP of 127.0.0.1 and the port number 50. The "Connect To Server" event allows manual input of the IP and Port number. I tried my IPv4 address as well and port 50, nothing is working.

Unless am missing something here?? Below is the script for hosting and below that is the script for connecting. It can't be anything to do with the variables because when testing via the editor it connects fine to 127.0.0.1 with port 50. So variables are working fine.



Last edited by Danny on Sat Jul 23, 2016 3:43 pm, edited 1 time in total.
Reason: Automatically merged double post.

User avatar
Mike
001 Co-Founder
 
Joined: Sun May 08, 2005 1:29 pm
Location: Ontario, Canada

Re: Can't connect from another computer lan/online?

Postby Mike » Sat Jul 23, 2016 3:51 pm

Some ports might simply not work without error. You can use the command line "netstat -a" on Windows to see a current list of used ones to get an idea of ones already in use. You can also check online for recommended port ranges.

Also, you need to make sure the app is running and active to receive or make a connection. I'm sure this was discussed in the thread already.

Finally, you may need to use the actual IP address of your Ethernet card if you have multiple when hosting. If you only have a single Ethernet adapter, use an empty IP address for the host event and it might figure it out for you.

Hope some of this helps. Just some ideas and definitely things that should be added to the wiki.

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Can't connect from another computer lan/online?

Postby Danny » Sat Jul 23, 2016 3:56 pm

Okay "Lan" is working.

Now the BIG question. How do i allow someone from the internet to join me? Do i use the same IP? Do i use another ip? So i need a server online? Or can they do direct connections?

After this one as been sorted think i got to grips with it all :D

Edit: Oh btw, the reason i couldn't connect earlier is because i was using the IP 127.0.0.1 for the host, i replaced this with my IP and now it works. The Wiki was a little misleading by saying the host can keep that IP address. :?
Last edited by Danny on Sat Jul 23, 2016 7:57 pm, edited 3 times in total.
Reason: Automatically merged double post.

User avatar
Mike
001 Co-Founder
 
Joined: Sun May 08, 2005 1:29 pm
Location: Ontario, Canada

Re: Can't connect from another computer lan/online?

Postby Mike » Sun Jul 24, 2016 3:19 pm

Can you tell me if leaving the ip address blank for the host event works as well?

User avatar
JimmySterylian
001 Fanatic
 
Joined: Tue Jul 29, 2014 2:28 pm
Location:  ­ 

Re: Can't connect from another computer lan/online?

Postby JimmySterylian » Sun Jul 24, 2016 3:25 pm

Yes, I can confrim that, connecting and hosting with a blank IP address field works with no problems for some reason.
Image

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Can't connect from another computer lan/online?

Postby Danny » Sun Jul 24, 2016 3:30 pm

Can also confirm, if you enter nothing for the port it automatically places a 0 there though after saving. Also unable to connect directl from client to server if no ip is assigned. (Obviously :lol: )

Edit: Ah! Nevermind. If you enter a port number but no IP seems to auto assign the hosts IP address anyway. Excellent! :lol:

Any ideas on how to connect directly to an hosts game from the other side of the world?
Last edited by Danny on Sun Jul 24, 2016 3:34 pm, edited 2 times in total.

User avatar
JimmySterylian
001 Fanatic
 
Joined: Tue Jul 29, 2014 2:28 pm
Location:  ­ 

Re: Can't connect from another computer lan/online?

Postby JimmySterylian » Sun Jul 24, 2016 3:33 pm

For me leaving the IP address field blank for both the Host and Connect event works. It doesn't even replaces it with 0, just completely blank.
Image

User avatar
Mike
001 Co-Founder
 
Joined: Sun May 08, 2005 1:29 pm
Location: Ontario, Canada

Re: Can't connect from another computer lan/online?

Postby Mike » Mon Jul 25, 2016 1:42 pm

I've made several updates to the wiki: http://engine001.com/wiki/networking

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Can't connect from another computer lan/online?

Postby Danny » Mon Aug 01, 2016 1:46 pm

Mike wrote:I've made several updates to the wiki: http://engine001.com/wiki/networking


When the game is ready or when you're wanting to play the game across the network, you should use an empty IP address for hosting on the default Ethernet adapter, or use the IP address of the network adapter desired. Clients should then use the IP address of the server to connect.


That is much better! The WIKI explains things a little better about the IP and Ports now :D

Edit: Any ideas on how to get people to connect me using my public IP? I've setup port forwarding, using my public IP, nothing is working. Firewalls etc disabled etc etc.

Bump: Anyone?

User avatar
JimmySterylian
001 Fanatic
 
Joined: Tue Jul 29, 2014 2:28 pm
Location:  ­ 

Re: Can't connect from another computer lan/online?

Postby JimmySterylian » Mon Aug 01, 2016 3:09 pm

For me everything works fine with my public IP. No need to mess with port forwarding or disable firewalls.
Image

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Can't connect from another computer lan/online?

Postby Danny » Mon Aug 01, 2016 3:43 pm

JimmySterylian wrote:For me everything works fine with my public IP. No need to mess with port forwarding or disable firewalls.


Don't suppose you mind sharing your setup do you? It's probably something am doing wrong or overlooking something. :)

User avatar
JimmySterylian
001 Fanatic
 
Joined: Tue Jul 29, 2014 2:28 pm
Location:  ­ 

Re: Can't connect from another computer lan/online?

Postby JimmySterylian » Mon Aug 01, 2016 4:19 pm

What kind of setup do you mean?
Image

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Can't connect from another computer lan/online?

Postby Danny » Fri Aug 12, 2016 8:48 am

JimmySterylian wrote:What kind of setup do you mean?


The server hosting and the server joining setup you have going on? If you say its working fine without disabling firewalls then clearly am doing something wrong.

What ip are you using for hosting and what port? How it the client connecting and to what ip and port? I have to be missing something if everyone else seems to be having no issues.

Bump......

User avatar
kararty
Ultimate 001 Member
 
Joined: Tue Dec 04, 2012 1:16 pm
Location: Sweden

Re: Can't connect from another computer lan/online?

Postby kararty » Fri Aug 12, 2016 9:56 am

Are you sure that you're using your Public IP?

Check this website to see if you're currently using your Public IP address (It's after "Your IP:") :

http://www.canyouseeme.org/

You can also use it to check if your ports are open. I used to have a modem from the ISP where it had faulty firmware so port forwarding wouldn't actually do anything.

Good luck.
Last edited by kararty on Fri Aug 12, 2016 10:21 am, edited 1 time in total.
Mike wrote:...

Image<~~~|Get over here!

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Can't connect from another computer lan/online?

Postby Danny » Fri Aug 12, 2016 10:00 am

kararty wrote:Are you sure that you're using your Public IP? I'm not sure how you got your public ip from the commandline, when I do "ipconfig /all" it just shows me the local IP's.

Check this website to see if you're currently using your Public IP address (It's after "Your IP:") :

http://www.canyouseeme.org/

You can also use it to check if your ports are open. I used to have a modem from the ISP where it had faulty firmware so port forwarding wouldn't actually do anything.

Good luck.


I've already tried canyouseeme.org and yes am using my public ip address given to me by google and my ISP.

User avatar
kararty
Ultimate 001 Member
 
Joined: Tue Dec 04, 2012 1:16 pm
Location: Sweden

Re: Can't connect from another computer lan/online?

Postby kararty » Fri Aug 12, 2016 10:28 am

Could you maybe try to see if the port you forwarded works with other games?

Also if your modem supports uPnP (Universal Plug 'n Play) try to enable it, or re-enable it if it's already active.
Mike wrote:...

Image<~~~|Get over here!

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Can't connect from another computer lan/online?

Postby Danny » Fri Aug 12, 2016 10:34 am

kararty wrote:Could you maybe try to see if the port you forwarded works with other games?

Also if your modem supports uPnP (Universal Plug 'n Play) try to enable it, or re-enable it if it's already active.


uPnp is enabled. All multiplayer games work perfect online without issues. Only 001 refuses to work. I've been trying alsorts for ages now. Is there no yet an online game made by anyone who is willing to show there script setup?

User avatar
kararty
Ultimate 001 Member
 
Joined: Tue Dec 04, 2012 1:16 pm
Location: Sweden

Re: Can't connect from another computer lan/online?

Postby kararty » Fri Aug 12, 2016 10:40 am

You mentioned that LAN worked 2 pages back so I don't know how a script would help you. Try to test w/ Kilatorian's game, the one with the pirates.
Mike wrote:...

Image<~~~|Get over here!

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Can't connect from another computer lan/online?

Postby Danny » Fri Aug 12, 2016 10:44 am

kararty wrote:You mentioned that LAN worked 2 pages back so I don't know how a script would help you. Try to test w/ Kilatorian's game, the one with the pirates.


Lans fine. Am talking about "Online Setup" so people like for example in States could join someone in the UK etc.

dragonnutds
001 Subscriber
 
Joined: Tue Oct 27, 2009 2:06 pm

Re: Can't connect from another computer lan/online?

Postby dragonnutds » Fri Aug 12, 2016 10:57 pm

I know engine001 works fine over the net, as i hosted the chat server for a bit. if other games work with your web configuration (and i mean the exact configuration, if you test with a minecraft server you have to use the same port as engine001 is trying to use) and engine001 still fails over the net, i have no idea what is going on in your network.

WAIT, is your software firewall running? that could easily block engine001
Image

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Can't connect from another computer lan/online?

Postby Danny » Sun Aug 21, 2016 9:23 pm

No issues with Firewall. It's probably a fault with my laptop as always...

Edit: I must be doing something wrong. I've formatted my laptop and reinstalled Windows 10, latest windows 10 update, plus everything already mentioned. What can i be missing?

I must not be understanding how to set up a server correctly or missing something obvious. :? :(

Thanks


Last bumped by Danny on Sun Aug 21, 2016 9:23 pm.


Return to Technical Support Questions

Who is online

Users browsing this forum: No registered users

cron