diabloweb icon indicating copy to clipboard operation
diabloweb copied to clipboard

Multiplayer

Open kermitdafrog8 opened this issue 6 years ago • 42 comments

Multiplayer says game exist when creating but doesn't exist when trying to join.

kermitdafrog8 avatar Sep 20 '19 15:09 kermitdafrog8

Same issue here.

dpastern avatar Oct 30 '19 01:10 dpastern

I'm having the same problem. :(

St4tikk avatar Nov 09 '19 00:11 St4tikk

Seems like @d07RiV just suspended both the development and hosting. I would say, You have to wait for another developer and probably hoster.

sskras avatar Nov 09 '19 09:11 sskras

It's still up but still unable to connect to multiplayer. I would actually like to host it locally for myself on my server.

kermitdafrog8 avatar Nov 14 '19 18:11 kermitdafrog8

I forked it and made at least WebRTC working: https://knotschi.github.io/diabloweb/ It is using now the default WebRTC server from https://peerjs.com/ which seems to work fine.

I've also added a PR #113 for this change in case the @d07RiV is not planning to bring his server back up

edit: this seems to be a bit buggy. If the creator of the game leaves: the game crashes. If anyone else leaves and tries to join the game it seems to not always work. If you leave a game you need to quit the game and start it again in order to join again.

Knotschi avatar Nov 21 '19 20:11 Knotschi

So it's possible to actually play with more than 1 player?

kermitdafrog8 avatar Dec 19 '19 16:12 kermitdafrog8

It worked for me fine using my local network. Through the internet it lagged a lot for me, most of the time it was not even possible to join a game. But maybe the internet connection was just not good enough. I am not sure. It also works fine on the same computer with different browsers (e.g. for exchanging gear between chars)

I also realized that sometimes, when it was not working anymore I had to restart the game (reload the browser) and than it was working again.

please try it out and let me know if it works for you

Knotschi avatar Dec 19 '19 17:12 Knotschi

Is there any way to contact you directly?

kermitdafrog8 avatar Dec 24 '19 21:12 kermitdafrog8

you can email me (my github username @posteo.de )

Knotschi avatar Dec 28 '19 20:12 Knotschi

@kermitdafrog8 wrote:

It's still up but still unable to connect to multiplayer. I would actually like to host it locally for myself on my server.

By stopped hosting I meant WebRTC, the multiplayer service. The files are present, yes, that's why this repo is receiving reports about failing multiplayer mode.

Going to try the @Knotschi fork.

sskras avatar Dec 29 '19 08:12 sskras

I have been on his fork playing single player on multiplayer mode.

kermitdafrog8 avatar Dec 29 '19 11:12 kermitdafrog8

Yep, just tried his and it's working. Tested with 2 devices (mobile and desktop), 2 players WebRTC. You need to have your own MPQ otherwise it fails. I have the full one but I'm assuming the shareware might work as well.

nakele avatar Jan 02 '20 18:01 nakele

It works if I use Firefox and Chrome on the same computer.

kermitdafrog8 avatar Jan 02 '20 18:01 kermitdafrog8

AH, gotcha. It only works if the devices are within the same subnetwork. AKA all connected to the same wifi. Websocket was the option to make it work across devices on separate networks. But that doesn't work.

nakele avatar Jan 02 '20 22:01 nakele

So you can't play against someone else outside your own network?

kermitdafrog8 avatar Jan 02 '20 22:01 kermitdafrog8

You might be able with a Virtual network. Could try "Logmein" or make your own VPN server + client.

nakele avatar Jan 03 '20 00:01 nakele

Having to both run a server and VPN seams to deafat the point of webdiablo, woudn't using DevilutionX make more sens at that point? There are still several unsolved issues in webdiablo and the maintainer appears to have abandoned the project. If you are on Android/iOS maybe the time would be better spend finishing the native ports for those platforms as you would get a better interface and widescreen support. https://github.com/diasurgical/devilutionX

AJenbo avatar Jan 03 '20 02:01 AJenbo

WebRTC should actually also work the same way over the internet as inside a local network. I am not sure if a virtual network would help here. I could imagine that the problem is just related to the higher latency over the web. But this would need to be tested, I don't know what the actual issue is. If I find some time for it I would like to do some further digging and maybe also try out to get the websocket version running but currently I have not time for that.

Knotschi avatar Jan 09 '20 10:01 Knotschi

you need a signaling server if u wanna use webRTC over internet, https://www.webrtc-experiment.com/docs/WebRTC-Signaling-Concepts.html

cojmar avatar Jan 13 '20 08:01 cojmar

@Knotschi I have some issue playing the Shareware version on your fork. Should it be reported?

I see knotschi/diabloweb doesn't allow creating issues in the repo.

sskras avatar Jan 15 '20 17:01 sskras

@cojmar Yes, this is why the version from @d07RiV wasn't working anymore, he shut down his server which was used as the signaling server. In my version I am using the default server from https://peerjs.com/ (which is a js library for webRTC which was used, it provides a default signaling server that you can use instead of setting up your own) This signaling server is not only used when you use webRTC over internet, also for creating connections in the local network to the computers can find each other.

@sskras you are right, I haven't tried that before. It should be fixed now. I've also enabled issues on my repo now

Knotschi avatar Jan 19 '20 16:01 Knotschi

It's been a long time and I still can't play multiplay. I'll be waiting

tiehr avatar Jan 20 '20 04:01 tiehr

@tiehr You mean over the internet? At least local network multiplayer works now fine for me on https://knotschi.github.io/diabloweb/

Knotschi avatar Jan 22 '20 16:01 Knotschi

@tiehr I know it's been a while, but if it helps, I successfully played Knotschi's fork with 3 other friends over the internet (no VPN/Hamachi service etc) yesterday. This was using Chrome with the full MPQ.

Thanks for your fix @Knotschi , I've had a blast so far!

eden-lecomte avatar Aug 10 '20 19:08 eden-lecomte

@tiehr I know it's been a while, but if it helps, I successfully played Knotschi's fork with 3 other friends over the internet (no VPN/Hamachi service etc) yesterday. This was using Chrome with the full MPQ.

Thanks for your fix @Knotschi , I've had a blast so far!

What configuration did u use? Windows? Wifi? Phone hotspot? What os? What device? What internet provider? Thank you :)

nakele avatar Aug 10 '20 19:08 nakele

What configuration did u use? Windows? Wifi? Phone hotspot? What os? What device? What internet provider? Thank you :)

OS: Windows 10 on desktop PC Connection type: ethernet (but my friends were on WiFi at their houses)

All of us are on stable fibre connections in Australia/New Zealand.

One of us hosted using WebRTC peer (or whichever the top option is in the multiplayer), and the others simply entered the game name. The time to connect was about 5-10 seconds.

eden-lecomte avatar Aug 10 '20 20:08 eden-lecomte

What configuration did u use? Windows? Wifi? Phone hotspot? What os? What device? What internet provider? Thank you :)

OS: Windows 10 on desktop PC Connection type: ethernet (but my friends were on WiFi at their houses)

All of us are on stable fibre connections in Australia/New Zealand.

One of us hosted using WebRTC peer (or whichever the top option is in the multiplayer), and the others simply entered the game name. The time to connect was about 5-10 seconds.

Thank you very much, will try again. My suspicious now is that phone network providers block something . . .

nakele avatar Aug 10 '20 20:08 nakele

What configuration did u use? Windows? Wifi? Phone hotspot? What os? What device? What internet provider? Thank you :)

OS: Windows 10 on desktop PC Connection type: ethernet (but my friends were on WiFi at their houses) All of us are on stable fibre connections in Australia/New Zealand. One of us hosted using WebRTC peer (or whichever the top option is in the multiplayer), and the others simply entered the game name. The time to connect was about 5-10 seconds.

Thank you very much, will try again. My suspicious now is that phone network providers block something . . .

Out of curiosity, I just tried to connect between my Macbook and my Android mobile (both using Chrome). It worked on WiFi, but failed (joined, then timed out) when my phone was on the mobile network (off WiFi).

I think a lot of providers (especially mobile network) block port 443 that the public PeerJS server relies on.

eden-lecomte avatar Aug 10 '20 20:08 eden-lecomte

What configuration did u use? Windows? Wifi? Phone hotspot? What os? What device? What internet provider? Thank you :)

OS: Windows 10 on desktop PC Connection type: ethernet (but my friends were on WiFi at their houses) All of us are on stable fibre connections in Australia/New Zealand. One of us hosted using WebRTC peer (or whichever the top option is in the multiplayer), and the others simply entered the game name. The time to connect was about 5-10 seconds.

Thank you very much, will try again. My suspicious now is that phone network providers block something . . .

Out of curiosity, I just tried to connect between my Macbook and my Android mobile (both using Chrome). It worked on WiFi, but failed (joined, then timed out) when my phone was on the mobile network (off WiFi).

I think a lot of providers (especially mobile network) block port 443 that the public PeerJS server relies on.

Same, pc on wifi + android on mobile network

nakele avatar Aug 10 '20 20:08 nakele

Guess im little late but ill give it a shot if any kind soul has the time to help me out. When im selecting multiplayer it gives me the following error: image Does anyone know what i have to configure on my server end? Many thanks in advance! @eden-lecomte maybe you can show me the right way to do it?

imneckro avatar Jul 13 '22 18:07 imneckro