[PLUGIN] Zack0Wack0's Construct 2 Plugins

0 favourites
From the Asset Store
Casino? money? who knows? but the target is the same!
  • allright, install rubygem on rails + rubygem-addressable-2.2.6 + rubygem-eventmachine-0.12.10 + rubygem-em-websocket-0.3.5

    placed client-side script on host and see black screen only(

    Where my fault?

    URL: http://deaftv.ru/websocket/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • does it work in local? the browser log output some strange errors on that page

  • firebug get this:

    undefined/socket.io/1

    wtf?

  • Ok tried it in firefox and it failed, don't know if it is related to your problem but i solved it by replacing this (in "runtime.js" of the plugin):

    if(!!WebSocket)
                  ?socket = new WebSocket(uri);
              else
                  ?socket = new MozWebSocket(uri);

    by this:

              if ("WebSocket" in window || "MozWebSocket" in window)
              {
                  ?var webSocketObject = "MozWebSocket" in window ? MozWebSocket : WebSocket;
                  ?socket = new webSocketObject(uri);
              }
    
  • Thank you Zack0Wack0! this is a great plugin. I had to make some chnages to make it work and it worked really well. I created a simplistic shooter and it worked in chrome and my computers at home.

    The post with the capx is here.

  • I've installed the socket-io (crossbrowser) plugin for C2, and I wanted to test this with node.js and the example server/client provided by Zack0.

    I have downloaded and installed node.js for windows (running W7), and installed the socket.io module as described by Zack0 in the original post:

    <img src="http://s15.postimage.org/kk0bw9pwb/Socket_IOpack.png" border="0" />

    As it appears, the module seems to be successfully installed.

    Though, when I try to run the example server, I get this error message:

    <img src="http://s19.postimage.org/usaxpxb9v/run_example_server.png" border="0" />

    • but again, I thought I had installed the socket.io module...

    I'm not the most advanced user in this kinda thing, so I thought I am probably doing some simple thing wrong - perhaps one of you guys could spot it? <img src="smileys/smiley9.gif" border="0" align="middle" />

  • Rasmus I think you have to install the socket.io module for node too (in c:\node)

    That's probably what's missing.

  • Rasmus : I think I had the same problem. If you are using Windows, I strongly suggest that you open the CMD, cd to C:\node_modules (create that folder is not present) and run the "npm install socket.io" from there. It seems that Node.js has "C:\node_modules" hardcoded as one of the paths to find the installed modules.

    Also, I did some small modification to the plugin to make my sample game work, please see my post here if you want to download the sample game and the modded plugin.

  • Thanks Zack0Wack0 for the plugin! I'm trying to get it to work now with a Server written with Java TCP/IP sockets (I couldn't get Node.js working), but it doesn't seem to work with the socket-io plugin. So the question is: Can this C2 plugin work with Java sockets? It would be much easier for me to code everything from scratch.

    Thanks in advanced!

  • rexrainbow Thanks for the link, but I can't seem to get socketio-java working :/ It has minimal documentation and I don't know how to set it up. Any chance you'd know what I need to do?

  • valkyriegames

    No, sorry. Might ask google by key "socket.io java server".

    I had build a (socket.io) python server before.

  • Zack0Wack0

    First, cheer! You made a usefull pluggin for multiplayers games! My actual professionnal project of bike simulator connect 10 peoples simunatly and that is a evidence socket is THE solution.

    Well we tryed the Socket IO version and we found somes problems on server implementation with Tomcat 7 and Spring MVC. Socket IO seem have no concret exemple with this server configuration. You can imagine how is hard to convience a long term project to change his server setup hehe... so... I've 2 big questions:

    1. Do have any information about my actual server configuration and Socket who can help us?

    2. If no answer to question 1, are you interested to work with me to build a Comet socket version for Construct 2?

    Comet work with actual server setup. playframework.org/documentation/2.0/JavaComet

    I'm a senior programmer who want help this community but if a start working on this plugin, I will for sure need assistance from you. I already explored your code and it seem to be easy. If you already started Comet version, tell me! My enterprise can pay for it! We register Construct 2 this week, cause last week my proof of concept was accepted!

    Thx in advance!

  • Hi Zacko,

    I was using juantar's modified plugin to do some testing and found a bug while connecting / disconnecting / reconnecting sockets.

    This could be of use to you.

    It is explained here:

    scirra.com/forum/topic52809_post331439.html

    I also found a fix (which is explained on the post), it would be great if you could let me know if this could cause problems.

  • OK quick question before i install it..

    Is using this plugin any different then using the "chat plugin" that is based on this one ?

    :o

  • The plugin tends to act up when you change to a different layout.

    It's almost like the entire app just freezes.

    Have you encountered an issue like this and know of a remedy?

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