Open GitBOUF opened 3 years ago
Hi @GitBOUF
Thanks for your interest in this project. In terms of saving the SaveStates to a server rather than the browser, most of that functionality I have already built into the emulator. If you take a look at "settings.js" there is a setting called "CLOUDSAVEURL". Once you change that to a URL you will see some of the functionality in the emulator will change. You will see a "Login" button appear on main page.
The idea here is that if you have a server set up that exposes a few endpoints, the emulator already supports saving to a cloud server. I actually have server code written but I did not to upload it to GitHub because server code is a lot less universal than front end code. My server code uses a .NET Framework Backend with a Microsoft SQL Server Database. However other folks may prefer a completely different stack (Node, MongoDB, etc...) That's why it's basically up to you how you want to implement that, but the front end code is all there already. If you take a look at script.js, all you would need to do is implement these 4 endpoints -
/Login /GetSaveStates /SendStaveState /LoadStaveState
You should also be able to see what these endpoints are expecting to receive back from the server as valid responses. In terms of your suggestion for multiple controller support, that is something I am planning on implementing in the future.
Thanks
@GitBOUF I went ahead and added the server code for cloud savestates into the server folder. You can check out the new Dockerfile here
https://github.com/nbarkhina/N64Wasm/tree/master/server/docker
Let me know if you have any issues.
Thanks
Thank you very much! I'm currently trying to build my own server with .NET Core. I'll give a look at your server code to understand how the API should behave server-side.
Have a good day!
Hi!
When I found your code, I was happy to see it is still actively being developed! I've managed to build it on a headless Ubuntu 20.04 machine and access it from a browser on my network using nginx. It worked really great!
While testing it in a self-hosted scenario, I stumbled upon some missing features that I think would be absolutely great for anyone wanting to self-host your emulator:
The points above could really bring the self-hosted n64 emulation to another level. With these features, I would be interested in making a docker image of your project, with your permission.
Of course, those are just suggestions. If none of them are going in the direction you had in mind for your project, feel free to close this issue :).