Yet-another Multiplayer Demo (with capx)

Show us your completed creations made in Construct 2

Post » Fri Sep 21, 2012 5:34 pm

contentscripts loaded chrome-extension://igdhbblpcellaljokkpfhcjlagemhgjl/scripts/contentscript.js:3
Creating Application Cache with manifest http://127.0.0.1/offline.appcache
Application Cache Checking event
Application Cache Error event: Manifest fetch failed (404) http://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 @ http://127.0.0.1/c2runtime.js:132


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

GET http://127.0.0.1:8099/socket.io/1/?t=1348246560787 socket.io.js:1626
Socket.handshake socket.io.js:1626
Socket.connect socket.io.js:1665
maybeReconnect socket.io.js:1971LimonSpace2012-09-21 17:59:15
B
11
S
5
G
1
Posts: 53
Reputation: 1,633

Post » Fri Sep 21, 2012 8:18 pm

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 LimonSpace2012-09-21 20:20:52
B
11
S
5
G
1
Posts: 53
Reputation: 1,633

Post » Sat Sep 22, 2012 2:04 pm

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 http://localhost:50001 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???
B
11
S
5
G
1
Posts: 53
Reputation: 1,633

Post » Sat Sep 22, 2012 2:31 pm

@LimonSpace A few things:

1. when I go to http://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 @ http://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!

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

Post » Sat Sep 22, 2012 3:39 pm

[QUOTE=juantar] @LimonSpace A few things:

1. when I go to http://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 @ http://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!

[/QUOTE]

thanks it work
will not know how to thank you ever

and thanks to all for the help received
B
11
S
5
G
1
Posts: 53
Reputation: 1,633

Post » Tue Sep 25, 2012 11:52 am

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
B
8
S
4
Posts: 5
Reputation: 1,135

Post » Thu Sep 27, 2012 5:37 pm

@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)

Thanksjuantar2012-09-27 17:38:18
B
26
S
7
G
3
Posts: 118
Reputation: 4,264

Post » Fri Sep 28, 2012 11:29 am

Oh , Thanks

It's work !!!
B
8
S
4
Posts: 5
Reputation: 1,135

Post » Tue Oct 02, 2012 8:04 pm

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
B
16
S
3
G
3
Posts: 15
Reputation: 2,813

Post » Tue Oct 02, 2012 9:10 pm

@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.
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 4 guests