HasangerGames / survivreloaded-server

An open source server for the defunct online game surviv.io. Work in progress.
https://resurviv.io
41 stars 23 forks source link

Download client ressources #15

Closed jwortmann closed 1 year ago

jwortmann commented 1 year ago

Very cool project! It's sad to see the original game die and the servers to shutdown. It would be awesome to preserve the game and allow people to create self-hosted servers. If I understand it correctly, this repository is basically a rewrite from scratch of the server code. And after a quick test, I'm happy to see the game somewhat playable, but there still seems to be a long way to go. Keep up the great work!


In the README you wrote

When the original site shuts down, I will upload the modified client to this repo.

and since the servers are shut down now, it might only be a matter of time until the surviv.io website becomes unavailable. I'm not a lawyer, but I assume that Kongregate still owns the rights to all of the game assets though, so I wonder whether re-uploading them would easily be possible/allowed.

Anyways, here is a small Python script which could be used to download all of the ressources given in the reference/urls.txt file (presuming the script is saved as a Python file directly in the repo folder):

Click to expand ```python import os import requests # install with `pip install requests` from pathlib import Path from urllib.parse import urlparse repopath = os.path.dirname(os.path.realpath(__file__)) try: with open(os.path.join(repopath, 'reference', 'urls.txt')) as f: for line in f.readlines(): url = line.rstrip() print(url) r = requests.get(url) if r.status_code == requests.codes.ok: filepath = os.path.join(repopath, 'public', Path(urlparse(url).path[1:])) dirpath = os.path.dirname(filepath) if not os.path.isdir(dirpath): os.makedirs(dirpath) open(filepath, 'wb').write(r.content) else: print('could not download ', url) except OSError as e: print(e) ```

Besides the replacement within the JavaScript file which is mentioned in the README, I had to also rename the js/app.<some hex digits>.js and css/app.<some hex digits>.css files to match the filenames which are referenced in index.html (or vice versa).


This was more of a general comment rather than an issue, so feel free to close.

Viswas-Programs commented 1 year ago

And, there is a suriv.io's creator toolkit that I found in an old kongregate forum post. Link to that is here https://drive.google.com/drive/folders/1qhaDdNCsisBu_7gvMNmyn_zkG4kyAZix

hsanger commented 1 year ago

@jwortmann Thank you! I already have the assets, and I will be uploading the client soon.

Viswas-Programs commented 1 year ago

and, is this project meant to be competitive against opensurviv.io? or this is no way related to opensurviv.io?