Open Benman2785 opened 5 days ago
Hi, if you look closely, you can see that this repository is only one commit ahead of the main project. And you can see that this user made fixes in the original repository later. So the changes from there are already in my project, but I have not seen the multiplayer working in the original project or in any other repository, if you notice that it works somewhere, please let me know, otherwise I will have to do it later, but there is a chance that there will be a lot of problems with it there
https://github.com/d07RiV/diabloweb/commit/998629fd5d9f87ba9693cf1409cf2acea603c06e
show that one function was disabled in latest d07RiV diabloweb version:
he did it because he disabled his server who served MP
And MP via WebRTC (direct connect) works well in Knotschis Fork - i can play it on my own server (https://hoffmeister.li/diabloweb/) - even from outside of my home-network :)
here a working MP Game using Knotschi fork 1st device (Host) is my Desktop 2nd device is my Mobile in Firefox Browser (Samsung)(not in WLAN)(using a VPN on my root) note: VPN is needed as my mobile carrier Vodafone blocks needed ports - when using the VPN i can also join a game on https://knotschi.github.io/diabloweb/ between my PC and Mobile
and here is the error in your version (which is linked to https://github.com/d07RiV/diabloweb/commit/998629fd5d9f87ba9693cf1409cf2acea603c06e )
as its a direct connection i can even play on "my server" with my desktop and connect my phone via knotschis server (github.io) - it still works tested this while being in WLAN and VPN - both worked
Thank you very much, you are the hero this city needs) added wasm._SNet_InitWebsocket();
Please check that this works correctly. And what are we going to do with it?
const sock = (websocket = websocket_open(
"wss://diablo.rivsoft.net/websocket",
I don't really like that the project has URLs that I can't control. And if you see that there are improvements somewhere that I missed, then let me know right away
https://github.com/d07RiV/diabloweb/commit/0c9403436f97f92ff5904f974fcadccf5f9f8909
shows that we have to use https://peerjs.com server
otherwise you can include a peerjs WebRTC signaling server in your built - so that you dont relay on an outside source
ah i see - you added Knotschis fix already: -but it doesnt work in your built tested it right now - it connects to peerjs - but only the host; no other player can join
both Singleplayer & Multiplayer are not working correctly
i think main problem is: 3.
behaviour of downloading diabdat.mpq (or spawn.mpq if not set isRetail = "true") for second time starting of game is only in Firefox // Edge/Chrome work fine
behaviour of not saving single*.sv & multi.sv & spawn_.sv is only present in Firefox
= i suspect Firefox has problems with its cache here - but this was NOT present before changes (yes there was an Firefox update today - but i dont think this is at fault here - as Knotschi fork still works fine)
found the Problem with MultiPlayer:
here a peerjs.com url of your build: wss://0.peerjs.com/peerjs?key=peerjs&id=6b339bef-52be-4dc2-97e0-293c073fe190&token=06li5ac17j3k&version=1.5.4
here a peerjs.com url of Knotschi fork wss://0.peerjs.com/peerjs?key=peerjs&id=diabloweb_dDv62yHQrZJP28tBEHL_asd&token=jkdxpdtifp
somehow your build does not take the correct id and also adds a version number
ps asd was the name of my game - thats why we cant connect, as your id is unique and doesnt add the game name to a fixed string
thanks, isRetail will not work correctly with all launch options because it is forcibly configured to launch on its own server, but we will deal with it later, here most likely there are still discrepancies in my project and its fork, I will check and fix it
hi,
https://github.com/Knotschi/diabloweb has WebRTC Multiplayer working - would be nice to have this too :)