Yet-another Multiplayer Demo (with capx)

Show us your completed creations made in Construct 2

Post » Sun Oct 28, 2012 2:48 pm

Is it supposed to stay stuck like this?

And now the multiplayer in the example isn't working...
B
29
S
7
G
3
Posts: 361
Reputation: 6,187

Post » Sun Oct 28, 2012 3:06 pm

@InvaderX

Yes!
That means the Socket.io is running and waiting for input :)
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Sun Oct 28, 2012 5:33 pm

But when I run the preview of the example capx, it doesn't connect.
B
29
S
7
G
3
Posts: 361
Reputation: 6,187

Post » Mon Oct 29, 2012 12:55 pm

@Schoening : yes, sort of. The count variable it would get massive if there is a massive amount of players joining. The count variable gets incremented only when a new player joins so that the server can assign a unique number to that player.

The server script in the sample was not designed to be run forever. It works more like the old games: you would start the server part of the game every time you wanted to play a multiplayer game, let you friends know about the IP address of your game session and then close it when you were done with the match.
B
26
S
7
G
3
Posts: 118
Reputation: 4,264

Post » Mon Oct 29, 2012 2:06 pm

[QUOTE=InvaderX] But when I run the preview of the example capx, it doesn't connect. [/QUOTE]

Tell us what going on. Schoening2012-10-29 14:30:07
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Mon Oct 29, 2012 2:11 pm

[QUOTE=juantar] @Schoening : yes, sort of. The count variable it would get massive if there is a massive amount of players joining. The count variable gets incremented only when a new player joins so that the server can assign a unique number to that player.

The server script in the sample was not designed to be run forever. It works more like the old games: you would start the server part of the game every time you wanted to play a multiplayer game, let you friends know about the IP address of your game session and then close it when you were done with the match.[/QUOTE]


It really helped me getting started on learning ServerSide JavaScript thank you very much !

For my use I will probably try to find a way to reuse the array in places where a player has left.

Like perhaps using This this, as a reference, and moving the players closer to 0 when some one leaves ^^
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Tue Oct 30, 2012 5:58 pm

hi! I have been working out trying this plugin for awhile and I cannot get it to work.

I installed node.js and socket.io already.

When I run client example, the example server is showing sent message but the sprite isn't showing and texts are unchanged. I don't know where it went wrong....
B
2
Posts: 2
Reputation: 259

Post » Tue Oct 30, 2012 7:29 pm

@Anggi do you have Chrome? can right click the page-> inspect element and then check the console tab. What does it say?
B
26
S
7
G
3
Posts: 118
Reputation: 4,264

Post » Thu Nov 01, 2012 4:02 am

@juantar yes, I am using chrome. in the console, it says

Exception:TypeError: Object #<HTMLEmbedElement> has no method 'CallJSFunction'
Port error: Could not establish connection. Receiving end does not exist. Anggi2012-11-01 04:03:22
B
2
Posts: 2
Reputation: 259

Post » Sat Nov 10, 2012 12:36 pm

Hello everyone, I have a little problem.
multplayer in my game I want to do the following thing:
have in map 80 aliens and I wish that every alien moved in random around the map and see that every connected client the alien.
in the sense that each client see the same alien move to their coordinates as with any client that connects to the server receives the message and sends it via the UM various movements and angles of the various connected clients.
Anyone have any idea or know address me properly to do this?
I did various tests but all with no good results.
cordially thanks simone
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 1 guest