kaansoral / adventureland

Adventure Land The Open Source CODE MMORPG
Other
189 stars 60 forks source link

Add way to play on self hosted server with steam client #128

Open melg8 opened 5 months ago

melg8 commented 5 months ago

I bought game and played it mostly on steam client, and some of my code choices are steam client specific (loading source code from local folder, etc). But as it seems now there is no easy way to play from steam client on self-hosted server.

It would be nice to have that option. If someone would come up with some kind of workaround it would be great too! (I play on windows 10 machine).

thmsndk commented 5 months ago

Once #116 is merged, something could potentially be done with the steam client.

The steam client is closed source though and we (the community) have no repository for it.

I also have a PR for caracAL that allows your bots to run via a headless client (no ui) to connect to self hosted servers https://github.com/numbereself/caracAL/pull/12

We could make our own community electron version of the steam client that would allow connection to non official servers. or some sort of proxy / modification that still requires you to have bought the game to get a working steam client that can connect to non official servers.

I'm mostly leaning towards a solution that requires you to have bought the game and applies modifications to the steam client you have already installed.

Noitabara commented 5 months ago

I was able to run the electron client by calling globally installed electron . in the electron folder.

You'd likely need to tweak a few of the values so that it points to the right servers/etc as thmsndk has said

yep;

var url="localhost/"; on line 17

if(dev)
{
    url="http://thegame.com/";
}

on line 19-22.

adventureland/electron/main.js

can do some more testing after work tomorrow to make sure that you can run/build it and use it in a localhost/LAN setting. I def don't see why not as we have all the client files and server files bundled within this project as far as I can tell.

melg8 commented 5 months ago

@Noitabara as for me i once been able to log in from electron, but then it all broke. After i restored server functionality, now i need to remove steam check cause then it just exits, and i can login to account, i can even connect to server and see whats happening, but when i click on concrete character - nothing happens, Although i can login from web just fine. I tried to force http instead of https for electron, but it seems not affect anything. Im not very familiar with node pipelines. Can you describe exact steps to reproduce working solution?

If i do: var url="localhost/"; - nothing loads at all.

if i do: var url="http://127.0.0.1"; - it logs and show server surrondings and characters. but dont give me enter onto character.

I start electron as npx electron . from electron folder.

Also i cant open inpsector, to see whats wrong with it for some reason.

I cant reproduce what magic i did first time when it worked. But after that my server broke ( i was doing npm install from electron folder inside main repo git, maybe it is a reason? after that game server would not start with error.)

I get this error if i enable steam check: изображение While i downloaded and put this file into place: изображение

I do this on windows 10.