Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

You'll need to replace "127.0.0.1" by local IP address (usually 192.168.x.x) of the computer that's running GMLive server (which requires that it's on the same network with the mobile device, obviously - mobile hotspot also works for this IIRC)

(2 edits)

Hi!

Thanks for the quick answer! I tried it, but still no luck!

I pulled out network cable from my PC and connected it to the same WLAN where my android mobile phone is connected.

10.0.0.4 is now the IP address of the PC. I installed a "ping"-app on my mobile and I pinged 10.0.0.4 from the phone, it is reachable.

Then  in obj_gmlive I replaced

live_init(1, "http://localhost:5100", "");
with
live_init(1, "http://10.0.0.4:5100", "");

Then I started gmlive-server on my PC:
Listening on port 5100...
0 clients.

Then I started my game in GMS2 with Android VM. The game started on my phone.

But gmlive-server still displays:
Listening on port 5100...
0 clients.

and when I change the source code, changes are not transfered to the phone.

On the console I still see:
10-15 19:38:41.423 15267 15981 I yoyo    : Exception = java.net.ConnectException: Failed to connect to /10.0.0.4:5100
10-15 19:38:41.454 15267 15324 I yoyo    : HttpGet("http://10.0.0.4:5100/init?password=&config=default&version=103", 18)

I guess I'm still missing something!

THX

Firstly, try running it on PC itself to see if the IP is correct and attempts to connect are not being cut by firewall.

Also check if the "internet" permission is enabled in Android game options - pretty sure it just throws that error if you have no permit.

Windows WM works with 10.0.0.4.

Internet permission for Android is enabled. (It is always enabled because our game-client often contacts our game-server via http.)

Any other ideas?

Thank your for your help!

(3 edits)

I found the problem. In the Firewall private network was not enabled, just public was enabled for GMS2-Runner and gmlive-server.  See the screenshot.

I dont know now exactly if I need both, but I checked now all 4 checkboxes which I marked with red color in the screen shot.

After that the connection worked.

THX