Yet-another Multiplayer Demo (with capx)

  • LimonSpace can your client run the game with chrome? If so can you check the console in chrome and look for any errors there?

    Also, what is the Url that the external client uses?

    If you connect within your home network, does it work?

    1   yes he can!

    on start first layout

    contentscripts loaded chrome-extension://igdhbblpcellaljokkpfhcjlagemhgjl/scripts/contentscript.js:3

    Document was loaded from Application Cache with manifest 192.168.1.2/offline.appcache

    Application Cache Checking event

    Application Cache NoUpdate event

    and there's connection to the server

    on click to connect

    Uncaught TypeError: Cannot call method 'apply' of undefined c2runtime.js:86

    Uncaught TypeError: Cannot call method 'apply' of undefined c2runtime.js:86

    2

    Uncaught TypeError: Cannot call method 'apply' of undefined c2runtime.js:86

    that is the output

    after that changing window 2 or 3 times compare the second loyout with the ship in the top left corner but is not where the server really must put. and there are no connection to the server

    2   the external client use my public ip cause i've an apache web server hosting on my 192.168.1.2 and with my public ip i can access to my index.html file and it work.

  • Adding master entry to Application Cache with manifest 192.168.1.2/offline.appcache

    Failed to load resource: the server responded with a status of 404 (Not Found) ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js

    Application Cache NoUpdate event

  • LimonSpace

    By the looks if your logs, you should uninstall construct 2 and reinstall it. As well as get an un modified version of socket-io-mod.

    You don't really need a web server like apache, all you need is to make sure your ports are open and run the server that is listening on said ports. How about, disable your firewall on your router and computer and go from there.

  • LimonSpace, hmm, you will need to get rid of those runtime errors first. Get the latest version of the plugin and make sure you put the runtime.js and edittime.js files in the correct place. Check if you are using the latest c2 version as well.

    also, after exporting the game delete the appcache file. do not minify yet.

    If u get the error again in Chrome, click on the blue link next to it and it will take u to the code line where the error occurred. Take a screenshot of that.

  • contentscripts loaded chrome-extension://igdhbblpcellaljokkpfhcjlagemhgjl/scripts/contentscript.js:3

    Creating Application Cache with manifest 127.0.0.1/offline.appcache

    Application Cache Checking event

    Application Cache Error event: Manifest fetch failed (404) 127.0.0.1/offline.appcache

    Uncaught TypeError: Cannot call method 'apply' of undefined c2runtime.js:132

    where should I put the edittime.js and runtime.js???

    when the first layout appears my server responce with 0 sent I,0,5,5 after putting id,port and click connect I've this error

    Uncaught TypeError: Cannot call method 'apply' of undefined c2runtime.js:132

    d.dh c2runtime.js:132

    a.qf c2runtime.js:127

    a.aa c2runtime.js:126

    b.wh c2runtime.js:89

    b.xj c2runtime.js:88

    b.trigger c2runtime.js:87

    b.ph c2runtime.js:97

    b.Vl c2runtime.js:74

    b.Oa c2runtime.js:72

    (anonymous function)

    this is the code line of the error

    function(){var a,c;a=0;for(c=this.n.length;a<c;a++)this.u[a]=this.n[a].get();return this.Y.apply(this.a.Hc,this.u)};d.prototype.dh=function(){var a=this.type.V().Ra(),c,d,b,e,i;c=0;for(b=a.length;c<b;c++){i=a[c];d=0;for(e=this.n.length;d<e;d++)this.u[d]=this.n[d].get(c);if(this.ia>-1){d=0;this.type.ua&&(d=i.type.Uc[this.type.pb]);this.Y.apply(i.ea[this.ia+d],this.u)}else this.Y.apply(i,this.u)}return m};Qa=d;c.prototype.Z=function(){if(this.type===11)this.Ob=this.a.li(this.le,this.Pa.parent);this.ic&&

    error in firefox:

    [18:51:17.860] TypeError: this.Y is undefined 127.0.0.1/c2runtime.js:132

    when i stop the server with the index online i've the rigth error

    GET 127.0.0.1/socket.io/1 socket.io.js:1626

    Socket.handshake socket.io.js:1626

    Socket.connect socket.io.js:1665

    maybeReconnect socket.io.js:1971

  • there's something strange.

    I tried to do this: launch a browser with a proxy connection to localhost:50000 going to choose server and write localhost port 8099 connect and all gonna be right my ship compare on the screen ecc ecc

    after that I launch another browser at 192.168.1.2/index.html (hosted in my apache server) when compare the choose server layer the server answers before i write the server address, port and click connect, and don't appears the game layer with the ship BUT the first browser can see the new ship

  • I did another test:

    delete choose server layer, delete even sheet2

    passed as parameters 127.0.0.1 to serverAddress 8099 to ServerPort

    modiefed index.html file with:

    var socket = io.connect('http://93.145.237.246:8099');

    launch a browser localhost and my ship is on the screen the server answers correctly.

    I asked a friend of mine put 93.145.237.246/index.html on his browser and the result is that i can see the new ship of my friend in my browser i see that the server send data to my friend but my friend can only see the background of the game he don't have his ship on the screen but i can see he in the server and in the screen how can i fixed that???

  • LimonSpace A few things:

    1. when I go to 93.145.237.246/index.html, the game there is minified. Export the game to your apache server without minification. It will help when troubleshooting.

    2. When you were connecting using Firefox, were your connecting to the index file hosted in your apache server? sor some reson the error you got in Firefox is not minified and you got the following error:

    [18:51:17.860] TypeError: this.Y is undefined 127.0.0.1/c2runtime.js:132

    Is there any way in Firefox for you to copy and paste the code lines around that line (line 132 of c2runtime) so that we can see them?

    3. Why are you adding var socket = io.connect('http://93.145.237.246:8099') to your index file? The plugin is supposed to connect to server you tell it to inside your C2 event sheet. Connect to your node.js server using the plugin actions in C2. The above line will not help you and will only confuse you more.

    Thanks!

  • LimonSpace A few things:

    1. when I go to 93.145.237.246/index.html, the game there is minified. Export the game to your apache server without minification. It will help when troubleshooting.

    2. When you were connecting using Firefox, were your connecting to the index file hosted in your apache server? sor some reson the error you got in Firefox is not minified and you got the following error:

    [18:51:17.860] TypeError: this.Y is undefined 127.0.0.1/c2runtime.js:132

    Is there any way in Firefox for you to copy and paste the code lines around that line (line 132 of c2runtime) so that we can see them?

    3. Why are you adding var socket = io.connect('http://93.145.237.246:8099') to your index file? The plugin is supposed to connect to server you tell it to inside your C2 event sheet. Connect to your node.js server using the plugin actions in C2. The above line will not help you and will only confuse you more.

    Thanks!

    thanks it work

    will not know how to thank you ever

    and thanks to all for the help received

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thank for your plugin

    I have question?

    How to export your Project?

    I tried export project and I build node example_server.js.It's work on C2 but

    I exported and run pass localhost.It's not work.I think it's don't go to Layout1

    How can i do?

    thanks to all for the help my question

  • ekalostz :

    1. Are you minifiying the export (un-check "Minify")

    2. Are you putting the exported files into a web server like IIS or Apache? (I don't think it will work if you just double click the generated index.html file)

    Thanks

  • Oh , Thanks

    It's work !!!

  • hello. juantar am reviewing again socket.io example you provided, unfortunately until now resume the game, the point is that I turned to find an object you're using "controller" and would like to know specifically makes

  • itza3985 controller is just a background object that I use for the sole purpose of holding variables that are used to "control" the flow of the game.

  • ok. thank

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