Open pantrombka opened 7 years ago
Hi @pantrombka Please note that webrtc support is experimental, because there is no official nodejs support for webrtc.
regarding your issue, it's not easy to tell what's going on from the above description but here are some hints .
first, disable webrtc and use the default eureca.io transport library to check that there is no other networking issue. if it work with the default transport switch back to webrtc.
activate the debug output using :
export DEBUG="*"
then run your server and open your client, the output could tell us what's wrong .
in the client side, use chrome/chromium browser and open development tab, and check what's going on in networking tab and console tab.
I remove transport: 'webrtc'. It works. With transport: 'webrtc' and export DEBUG="*" I can't see any messages - only
* using webrtc
listening on 8000
and
* using webrtc
http://myip:8000 eureca.io
I changed transport: 'webrtc' to transport: 'webRTC' and I see errors:
* using primus:webRTC
primus transformer `json` is a string, attempting to resolve location
primus transformer `webRTC` is a string, attempting to resolve location
primus the supplied transformer webrtc is not supported, please use [object Object]
Primus:
Primus: Unsupported transformer: "webrtc"
Primus: We only support the following transformers:
Primus:
Primus: websockets, engine.io, browserchannel, sockjs, faye, uws
Primus:
the correct syntax is "webrtc" in lowercase.
it strange that the debug directive is ignored, you are on a linux environment right ?
Yes, I am in linux. Command export DEBUG="*" looks OK echo $DEBUG index.html server.js and other files
node -v v7.7.1
when you type echo $DEBUG do you see the value "*" ? if not, you need to set it.
the latest version of nodejs I tested was 6.x there are maybe some breaking change in the latest version or in node-webrtc package, I'll try to make new tests asap.
I changed nodejs to v6.10.0. Still nothing. npm node-webrtc -v 3.10.10 This look like server is working, but messasing are blocking.
When I remove " transport: 'webrtc' " I see Debug messages on the server.
Sorry, verion of my modules:
npm list eureca.io eureca.io@0.6.42 npm list wrtc wrtc@0.0.61
I just pushed the newest version to npm (it was only available on github). can you please update eureca.io and try again ? I don't think that it'll resolve the issue since the last update didn't modified webrtc behaviour, but just to make sure you have the latest version.
Now I have eureca.io v0.7.1. Unfortunately, problem still exist.
Can you please share what you see in the client side in chrome developement tools, Console and network tabs ?
make sure to enable chrome dev tools, then refresh the client .
network tab: http://pasteboard.co/4imFIGHds.png console tab: http://pasteboard.co/GXCJtcf9G.png
On Firefox console: eureca.js:398: RTCIceServer.url is deprecated! Use urls instead.
I still have a problem with WebRTC, but I wonder whether in my project (something like http://ezelia.com/2014/tutorial-creating-basic-multiplayer-game-phaser-eureca-io) using of webRTC is good? Performance will be better?
Sorry for the delay. the webRTC issue will take some time to fix, it seems to be related to deprecated functions in the browser side, plus some code changes in node-webrtc side ... :/
regarding the implementation, for simple multiplayer games, it won't make lot of change in performance, I made this tutorial only to show how to implement very basic multiplayer logic, it's not optimized at all ! the lags that you may encounter are because the code don't implement any lag compensation algorithm, it use a "dumb" aproach which consist in boradcasting all players' commands.
WebRTC can be interesting in massive multiplayer games, and realtime multiplayer games . but since webRTC transport is not reliable, it'll require that you implement code to handle cases when the call fails ...etc. so it really depend on what you are trying to do.
in most cases, the standard transports are enought, you just need to make good implementation, sometimes with lag compensation algorithms, sometimes with other technics.
I think, it could be useful for me. So I will be waiting for fix. Thank you!
I have a problem with webrtc transport in eureca.io. I installed on my VPS module wrtc. My server.js:
and client.html:
On server I see only:
On client:
Where is the problem?