Yet-another Multiplayer Demo (with capx)

Show us your completed creations made in Construct 2

Post » Sun Sep 16, 2012 1:50 pm

[QUOTE=Velojet] @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!)[/QUOTE]


how can do that?
can you show me an example?
B
11
S
5
G
1
Posts: 53
Reputation: 1,633

Post » Sun Sep 16, 2012 8:34 pm


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 LimonSpace2012-09-16 20:38:40
B
11
S
5
G
1
Posts: 53
Reputation: 1,633

Post » Mon Sep 17, 2012 8:50 am

@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.
B
18
S
9
G
5
Posts: 77
Reputation: 4,946

Post » Mon Sep 17, 2012 9:59 am

[QUOTE=LimonSpace]          
        var socket = io.connect('http://localhost:8080');    
[/QUOTE]
@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).
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Mon Sep 17, 2012 10:50 am

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.

B
11
S
5
G
1
Posts: 53
Reputation: 1,633

Post » Wed Sep 19, 2012 10:40 pm

@LimonSpace

Yeah, I recreated your situation and I have the same problem as you. This weekend I'll sit down and try help you.
B
18
S
9
G
5
Posts: 77
Reputation: 4,946

Post » Wed Sep 19, 2012 11:12 pm

@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 lonehangman2012-09-19 23:41:25
B
18
S
9
G
5
Posts: 77
Reputation: 4,946

Post » Thu Sep 20, 2012 6:54 am

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 testingLimonSpace2012-09-20 07:46:02
B
11
S
5
G
1
Posts: 53
Reputation: 1,633

Post » Thu Sep 20, 2012 8:42 am

@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.lonehangman2012-09-20 08:47:48
B
18
S
9
G
5
Posts: 77
Reputation: 4,946

Post » Thu Sep 20, 2012 1:32 pm

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?
LimonSpace2012-09-20 13:45:18
B
11
S
5
G
1
Posts: 53
Reputation: 1,633

PreviousNext

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 2 guests