Yet-another Multiplayer Demo (with capx)

Show us your completed creations made in Construct 2

Post » Tue Feb 28, 2012 10:07 pm

[QUOTE=smitchell]... I think im getting there in terms of understanding. But the multiplayer needs to run of node.js right? can a webserver run node.js?[/QUOTE]
Node.js is one means of making a server, but multiplayer gaming servers have been around for a long long while before node.js came on the scene.

[QUOTE=smitchell]... I think I need a example, would that be possible?[/QUOTE]
I'm not sure what you mean by an example, but here's an article on building a multiplayer PC gaming server (using free servers that aren't node.js based), that might help to expand your understanding (including giving you an idea of the complexities )
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Sat Mar 24, 2012 12:47 am

Hi I followed the step but. when I run the. capx introduce the correct ip and port and nothing happens.

result server= info- handshake authorized 881214523216515

result client= text in the textbox
B
1
Posts: 3
Reputation: 256

Post » Sat Mar 24, 2012 1:31 am

[QUOTE=chromstruct] Hi I followed the step but. when I run the. capx introduce the correct ip and port and nothing happens.

result server= info- handshake authorized 881214523216515

result client= text in the textbox [/QUOTE]
i had the same problem when i tried to use the ip for the lan network for eg 192.168.1.86 it doesn't work but when i tried 127.0.0.1 and open the game in different browsers it worked :S
any solution to this?

thank you
B
14
S
1
Posts: 31
Reputation: 1,208

Post » Sat Mar 24, 2012 3:12 am

@chromstruct and @noranka: Interesting... what browsers are you using? The "info- handshake" message that you get, where do you see it?in the console or the screen?

Also, I uploaded a new version with a small fix in the example server, can you please re-download the plugin.

Thanks
B
26
S
7
G
3
Posts: 118
Reputation: 4,264

Post » Sat Mar 24, 2012 4:14 am

i use firefox and chrome to test the game
when i entered 192.168.1.86 and the port number the textbox just disappears and nothing happens

i'll try the new plugin thanks
B
14
S
1
Posts: 31
Reputation: 1,208

Post » Thu Mar 29, 2012 1:20 pm

Hello ! (My first post )

Thanks you very much for the demo.

I have one question regarding the usage of the demo, I can use it without problem locally,but I can't launch the game from the web browser he didn't work. The game is only working if I launch it from Construct2.

Does somebody know why ? ( I have already try to uncheck minify)

I get this error if I check with chrome :
Uncaught ReferenceError: log is not defined

Thanks in advance for any help !

Regards
B
5
G
1
Posts: 11
Reputation: 947

Post » Sun Apr 01, 2012 2:30 am

@Shiva : are you opening the web page by double clicking on it? that might not work, it has to be hosted in some kind of webserver. It works in debug mode in C2 because C2 uses a local webserver (localhost:5000) to host the game.

Thank you for using the plugin!
B
26
S
7
G
3
Posts: 118
Reputation: 4,264

Post » Sun Apr 01, 2012 11:55 am

Hi !,

I have open the webpage by the url where I have upload it.

What's strange is that the error that the function log is not defined is strange because there's other log usage before the error and they don't produce this error.

I have tried to restart all from scratch and now I could not more open your capx after install the update R84.

My goal was testing the usage in a website without construct 2. Because everything is working correctly from construct preview. I have manage to use my webserver at home to proxypass the connection in apache like this :

player1 -> webserver.com -> webserver@home -> webserver.com -> player2

I have tried this because I could not launch node.js from my website hosting service.

:) Shiva2012-04-01 11:56:01
B
5
G
1
Posts: 11
Reputation: 947

Post » Wed Apr 04, 2012 6:24 am

good job this sample open my mind about possibilities html5 multiplayer game, but there is annoying bug in your code sample.. new player which just login can't see old player, but old player can see new player joined after him. can you tell me the problem or maybe you can fix the code and let me see it.

Regards
B
3
Posts: 5
Reputation: 310

Post » Wed Apr 04, 2012 3:03 pm

@istanto did you get this error with the new version? I saw that problem and I though I fixed it in the latest release. It was a problem with the code in the example_server.js file (I was not using the broadcast method in the socket).

@Shiva I have not tried R84 with the plugin yet, I will give it a spin.
B
26
S
7
G
3
Posts: 118
Reputation: 4,264

PreviousNext

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 8 guests