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.

AppGameKit Classic Chat / Problem with the internet multiplayer connection

Author
Message
Brny
8
Years of Service
User Offline
Joined: 12th Oct 2015
Location:
Posted: 8th Feb 2016 04:47
Hi, so i have a server ( a computer connected to the internet thorough a modem ) and a client (my phone).

For the connection i use Joinnetwork ( "IP", name)

If i use the client inside my home network it works perfect, the problem is when i disable the phone's wifi and i try to connect thorough the internet using the

own phone internet, and here it doesent connect.


Someone knows what can be? i will appreciate any help.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 8th Feb 2016 08:47
Your internal IP address is not the same as your external IP address. Have you changed it?
There could be other issues, I haven't tried an external link.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 8th Feb 2016 12:20
What BatVink said, make sure you're connecting to each device with their external IP address, and ports to the home network machine are forwarded correctly.
Brny
8
Years of Service
User Offline
Joined: 12th Oct 2015
Location:
Posted: 11th Feb 2016 20:29 Edited at: 11th Feb 2016 20:29
Hello guys, sorry but i didnt had time. Yes i tried to fordward a range of ports, but i didnt had time to even try if it works... i'll play with it this weekend
Preben
AGK Studio Developer
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 12th Feb 2016 09:07 Edited at: 12th Feb 2016 09:55
Just remember , if YOU have to forward your ports on the router, then your end-users will also have to do that , so most users will NOT be able to play your game.

How many "messages" do you need to sent/receive each second to make your game work ?

I ask because if you do not need to many messages per second you could setup this in a php script and use normal http request to sent and receive the messages. web servers have Keep alive so you will not have problems with reconnect times, it would be a peek type setup, so no problems with disconnections ( you sent a message and get information back in the same request ). And mainly: All users are able to use port 80 http request without any changes.
I have done some test using a system like this. it do require that you setup the webserver in a special way to enable many players at the same time. I compiled apache using a MPM worker ( 64 connections in each apache thread ) , normally the web server loads php etc.. each time you make a request to a server, in a worker mpm 64 connections/users share the same memory. so it do not use to mush memory this way. And sure you can have many apache clients at the same time , so if you setup 20 apache clients with 64 threads each 1280 users will be able to use it at the same time. Also you need to install memcahce , so your PHP scrips is able to use a shared memory block to store your game messages , so ALL php connections share the same memory , no sql or disk activity needed to share data.

best regards Preben Eriksen,
Brny
8
Years of Service
User Offline
Joined: 12th Oct 2015
Location:
Posted: 13th Mar 2016 09:33 Edited at: 13th Mar 2016 09:34
Hello Preben, many thanks for your answer, so you say to use the port 80 cos is always open... yes, sounds good.

But the question is, if i have the server on a LAN, how can i reddirect all the connections of the AppGameKit game to the server? because all the computers on the net will be using the port 80 aswell...
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 13th Mar 2016 11:30
Since we're here, anybody have a demo on how to make multiplayer works using php server?

I've never make one, so an example project will be a great help to newbies like me. Don't even know where to start
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 13th Mar 2016 13:25
Quote: "so you say to use the port 80 cos is always open"

I don't think you can use port 80 as it's already mapped to HTTP requests. It should be fine if your method of networking is purely HTTP requests, but this won't work for a realtime game.

Login to post a reply

Server time is: 2024-04-18 19:44:50
Your offset time is: 2024-04-18 19:44:50