Author Topic: Stuck on "Connection" Screen  (Read 2082 times)

gevarre

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Stuck on "Connection" Screen
« on: September 10, 2014, 01:13:52 PM »
Hi,
so I've followed the examples and created the basic game.

If I start TNserver, I can connected to it and play the game just fine on one computer. The problem is, if I start the server and then try to connect on any other computer in the house, it loads the start scene with the "Connecting" text, and just sits there.

The server shows the Gateway and External IP's and says that all ports were opened successfully: lobby server started on port 5129 with interface 0.0.0.0 and game server started on port 5127.

I know this could be a lot of things, but any thoughts on what to check? Are there any diagnostics I can add to the scripts to help figure out what's going on? I'm running the server on Windows 7, and the first time I ran it I did make sure that both the "private" and "public" checkboxes were checked, then restarted it.

I'm a little concerned because if I'm going to release something publicly, it has to just work without the end user having much IT knowledge and I thought this was what Tnet was specifically good for. On the other hand, if it's something peculiar that I've messed up with my own network setup that has nothing to do with Tnet, then obviously I need to figure that out, too.

All help and thoughts are appreciated. Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Stuck on "Connection" Screen
« Reply #1 on: September 11, 2014, 01:52:53 AM »
Are you trying to connect to the right address? 127.0.0.1 is a loopback address -- it always points to the machine you're running the executable on. What address are you using?

Note that TNet has "OnNetworkError" function that you can use to show error messages.

gevarre

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: Stuck on "Connection" Screen
« Reply #2 on: September 12, 2014, 12:24:24 AM »
Aha. That was it. I somehow was under the impression that the autoconnect script automatically took care of that. Once I entered the right address into the inspector, it worked just fine. Switching that out with the "menu" scene from your included examples worked even better. That way at least the correct address is listed for the player to select. I'll eventually have to figure out a full-on master game server so that people can search online for active game lobbies, but this is great for now.

Thanks for the tip  :)