Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplayer #99

Open
kermitdafrog8 opened this issue Sep 20, 2019 · 42 comments
Open

Multiplayer #99

kermitdafrog8 opened this issue Sep 20, 2019 · 42 comments

Comments

@kermitdafrog8
Copy link

kermitdafrog8 commented Sep 20, 2019

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

@dpastern
Copy link

Same issue here.

@St4tikk
Copy link

St4tikk commented Nov 9, 2019

I'm having the same problem. :(

@sskras
Copy link

sskras commented Nov 9, 2019

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

@kermitdafrog8
Copy link
Author

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

@Knotschi
Copy link
Contributor

Knotschi commented Nov 21, 2019

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.

@kermitdafrog8
Copy link
Author

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

@Knotschi
Copy link
Contributor

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

@kermitdafrog8
Copy link
Author

Is there any way to contact you directly?

@Knotschi
Copy link
Contributor

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

@sskras
Copy link

sskras commented Dec 29, 2019

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

@kermitdafrog8
Copy link
Author

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

@nakele
Copy link

nakele commented Jan 2, 2020

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.

@kermitdafrog8
Copy link
Author

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

@nakele
Copy link

nakele commented Jan 2, 2020

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.

@kermitdafrog8
Copy link
Author

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

@nakele
Copy link

nakele commented Jan 3, 2020

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

@AJenbo
Copy link
Collaborator

AJenbo commented Jan 3, 2020

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

@Knotschi
Copy link
Contributor

Knotschi commented Jan 9, 2020

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.

@cojmar
Copy link

cojmar commented Jan 13, 2020

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

@sskras
Copy link

sskras commented Jan 15, 2020

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

@Knotschi
Copy link
Contributor

Knotschi commented Jan 19, 2020

@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

@tiehr
Copy link

tiehr commented Jan 20, 2020

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

@Knotschi
Copy link
Contributor

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

@eden-lecomte
Copy link

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

@nakele
Copy link

nakele commented Aug 10, 2020

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

@eden-lecomte
Copy link

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.

@nakele
Copy link

nakele commented Aug 10, 2020

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 . . .

@eden-lecomte
Copy link

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.

@nakele
Copy link

nakele commented Aug 10, 2020

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

@imneckro
Copy link

imneckro commented Jul 13, 2022

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?

@AJenbo
Copy link
Collaborator

AJenbo commented Jul 13, 2022

No clue, have you tried DevilutionX instead?

@imneckro
Copy link

imneckro commented Jul 13, 2022

No clue, have you tried DevilutionX instead?

Didnt try it. Does DevilutionX build for web?

@AJenbo
Copy link
Collaborator

AJenbo commented Jul 13, 2022

It does build for web, but is currently not support. But it is native for most platforms, what are you trying to run it on/needing it for?

@imneckro
Copy link

@AJenbo im hosting this on apache server. I want to test multiplayer support but when selecting multiplayer gives me:
178810207-5368b4bc-8924-4b23-b9c9-91b9b256c63f

I read older messages saying that multiplayer was working.

@nakele
Copy link

nakele commented Jul 16, 2022

Screenshot_20220716-164252_Firefox Nightly

@AJenbo im hosting this on apache server. I want to test multiplayer support but when selecting multiplayer gives me: 178810207-5368b4bc-8924-4b23-b9c9-91b9b256c63f

I read older messages saying that multiplayer was working.

Use this link and then direct option for multipley, one create and the other joins: https://knotschi.github.io/diabloweb/

Tested now on my phone on 2 separate browsers

Edit: Apologies I don't think I understood that you wanted to run it on ur own server.

@imneckro
Copy link

imneckro commented Jul 16, 2022 via email

@kermitdafrog8
Copy link
Author

It sounded like it was something with WebRTC hosting.

@imneckro
Copy link

@kermitdafrog8 did you spot Knotschi's differences vs d07RiV?

@kermitdafrog8
Copy link
Author

kermitdafrog8 commented Jul 16, 2022

@imneckro did you look at #113? This might be the answer to your question. Not sure.

@imneckro
Copy link

@kermitdafrog8 I end up building the forked one from Kotschis repo and all works fine.

@imneckro
Copy link

imneckro commented Oct 11, 2022 via email

@Knotschi
Copy link
Contributor

Knotschi commented Oct 11, 2022

The small change I made was already merged: #113
So my fork should not be needed anymore.

But it seems that this one here has a different issue now which leads to the error you show.

I think this commit might have introduced the new issue “No Network selected": 998629f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests