Yet-another Multiplayer Demo (with capx)

0 favourites
From the Asset Store
Demo Game Multiplayer Online with member registration system
  • LimonSpace

    Is your own server publicly available through the DNS? Assuming it is, then in your index.html you simply reference the appropriate URL to access your server. (But I hope you're taking all the necessary security precautions!)

    how can do that?

    can you show me an example?

  • I modified the index in this way.

    <script src="http://localhost:8080/socket.io/socket.io.js"></script>

          <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>

          

    <script>

            var name = '';

            var socket = io.connect('http://localhost:8080');

    </script>     

    because the server and the file html is hosted on my apache server and when the people write my public ip in this case 93.145.238.228 can access to my html file and for now he work,

    with this modification i access to my html file with a proxy and i see that my js server sends data but in the screen don't compare the player schip

    SORRY FOR MY ORRIBLE ENGLISH

  • LimonSpace

    Try host it off dropbox and see if that works, I hosted the socket-io-mod on dropbox and started the server on my computer. Then I connected it from all the devices in the house (Couple of iPads, phones, and computers). And it worked perfectly, so try with that.

  •           

            var socket = io.connect('http://localhost:8080');    

    LimonSpace

    Unfortunately, this won't work in the way you want it to. localhost references the server residing on the user's machine (if s/he has one), not your server (unless you happen to be the user).

  • but when the people try to connect to my server my server serponce to all request the only thing is that the ship don't appare on the screen but if i see my server i note that he responce.

  • LimonSpace

    Yeah, I recreated your situation and I have the same problem as you. This weekend I'll sit down and try help you.

  • LimonSpace

    So...I've figured out and fixed your problem. The solution came to me in

    the shower...

    Anyway, What I did was change the listen port to 443 and opened port 443.

    You could have stopped reading after this, but I'll explain anyway.

    Port 443 is the port for SSL and thus traffic is apparently more secure, which is why the firewall allows it.

    The reason why this works is because some firewalls block the web socket port but will allow it if it is on port 443. Thus, changing your server port will allow your server to be seen on the web.

    I have tested this with both internal and external clients, and they could all join.

    Anyway, hope this helps

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • lonehangman

    I think I love you!!!!!!

    thanks soooooo much very much now i try your solution and if it work I will marry you,

    But another think can you show me the right way cause when i start my server on port 443 he don't start:

    warn - error raised: Error: listen EADDRINUSE

    what kind of application use this port I understand that there's some application that lock this port i try with pfporthCheker and he said me:

    pleace close all the application use this port for testing

  • LimonSpace

    Well...firstly I do hope you are a female ;D

    And secondly, a lot of other programs will probably use this port. You'll just have to check and find the program that uses it.

    It would be easier if you set up a cloud based server. Windows azure has node.js and a 3 month free trial.

    I have to go to work now, but just close all network programs. Or you can open and test port 80 and 843.

    Beyond that, I don't know. 443 works for me fine, you'll just have to experiment. You'll probably have some luck with 843, because 443 is quite a commonly used port.

  • I dunno how you managed to make it work.....on 843 is the same of 8000

    the the server responce but the ship don' compare and i don't know how can i work with 443 port

    how do you modiefed your html file can you show me?

  • LimonSpace

    I'm using a clean copy of the html file and a clean example_server.js (except for the port of course).

    Read this: github.com/LearnBoost/socket.io/wiki/Socket.IO-and-firewall-software

    I don't know what more to do, try port 80.

    Have you opened the ports on your router, and your computer's firewall?

    Wait...is your server listening (example_server.js) on those ports or are you changing the connecting ports (in the HTML file).

  • yes is all open but when i try pfportcheker he said me that 443 is not open i dunno why, i set all like port 8000 and with 800 is forwarded with 443 no me damn wanna u my skype?

  • and when i try to connect by proxy to the html file hosted on my apache web server the node.js server responce

    send I ,0, 500 ,500

    but ship nothing

    null i can't forward 443 i dunno how do that.

    that's my skype simone.comellato84 if you wanna tell me....

  • now i try with port 80 the port is forwarded but the same thing happens.

    the client connect to the server but ship don't appare if u give me the code of index.html maybe i understand something.

  • LimonSpace can your client run the game with chrome? If so can you check the console in chrome and look for any errors there?

    Also, what is the Url that the external client uses?

    If you connect within your home network, does it work?

Jump to:
Active Users
There are 2 visitors browsing this topic (0 users and 2 guests)