Yet-another Multiplayer Demo (with capx)

0 favourites
From the Asset Store
Demo Game Multiplayer Online with member registration system
  • 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....

  • Anggi do you have Chrome? can right click the page-> inspect element and then check the console tab. What does it say?

  • 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.

  • 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

  • Does anyone know how to catch the following error when the server code execution is terminated?

    "Javascript error!

    TypeError: this.socket is null

    localhost/socket.io.min.js, line 2 (col undefined)

    This is either a bug in Construct 2 or a problem in a third party plugin or behavior - please report it to the developer!"

    I thought it might be if ...

    socket | is data available?    Do stuff here while server is running

    ELSE

    <catch error / disconnection to server here>

    But that doesn't seem to catch it... or using the 'On Error' event, or inverting 'socket | !is data available' event...

    ?

  • remy-jay I think JohnnySheffield's version (http://www.scirra.com/forum/plugin-zack0wack0s-socketio-mod_topic56503.html) fixes this issue.

    I think you can also add the disconnect event and adding an action there to disable the ondata received event (system->disable event group). You will need to put the ondata received in its own group.

  • Just want to ask , does this plugin works if i made the game for windows 8 ? or it just work for ios? Thanks in advance.

  • I have not tested windows 8 rt, but it works on chrome on win 8 desktop version

  • Hi,

    Managed to get a game and socket io server working fine on my computer thanks to these examples. But does anyone know how and where to host the game and the socket.io server files?

    I tried uploading them on nodejitsu, but unfortunately all I'm getting there is a 'welcome to socket.io' message instead of the very basic tester game I was hoping to see.

    Does anyone have any experience with uploading these files? If so, any info or pointers would be appreciated.

    Thanks!

  • HollyB

    Can't help you with this plugin but take a look at my MultiPlayer + online demo. My demo's hosted on Nodejitsu, so you should be able to do the same if you use my plugin/behavior and examples.

  • Hello.

    I'm completely new to any form of game-making (real noob), and have no programming competence of any form, so pliz be patient with me. That's the main reason i ended up with DL'ing C2, which seemed like a cool and pretty-easy to learn software. Just wanting to ask if this plugin of yours is the furthest the C2 community has gotten to a real multiplayer feature for C2? And how does it work, could i make a PvP game like for instance "tetris battle" with it, or would that require more complexity and development?

    The answers might already be in the thread, but as I stated i am completely new to "game-making", so I don't udnerstand much of the issues discussed, I need very basic language to understand. Thanks for any answers in advance :)

  • I'm sorry. My post were supposed to be posted on the "Multiplayer + online demo" topic. Had both threads open. Silly me :P

  • Schoening

    That is somewhat correct, but use this anyway.

    socket.on('disconnect', function (data) {

          

          socket.broadcast.emit("message",'D,' + mySelf[0] + ',' + mySelf[1] + ',' + mySelf[2]);

          entities[myNumber] = null;

          

    });

    juantar

    or anyone that can help.

    I've created a server and made it all work. I uploaded it to various different hosts. But they all seem the have the worst connections, with an average ping time of 300 ms.

    What would be the best host to host such a server.

    i try this solution

    socket.on('disconnect', function (data) {

         

          socket.broadcast.emit("message",'D,' + mySelf[0] );

          entities[myNumber] = count--;

    console.log('D'+ ',' + mySelf[0]+ ',' + 'SCONNESSO');

         

    });

    because with your code, the new player can still see the old player who is disconnected.

    and for this I put in my layout a LOGOUT button but is the same if you close the browser.

    I created a new client, it communicates with another client and enters into aliens, box etc etc, now I have a little problem, when the client aliens that acts as a virtual machine connects sends a connect message, put the aliens on the player client and everything works. the problem is that it also creates a spaceship, perhaps due to the message I, how can I fix this?

  • Try Construct 3

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

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

  • Any idea why this error occurs?

    <img src="http://i1294.photobucket.com/albums/b603/oliverschoening/socketpluginproblems_zpsbbbce838.png" border="0" />

    Node Code:

       socket.on('disconnect', function(data) {

           ?socket.broadcast.emit("message", "D," + myID);

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