rommapp / romm

A beautiful, powerful, self-hosted rom manager
https://romm.app
GNU Affero General Public License v3.0
2.02k stars 88 forks source link

[Feature] Saves not saving to server #786

Open TheCyberQuake opened 6 months ago

TheCyberQuake commented 6 months ago

Is your feature request related to a problem? Please describe. Currently, when a game is saved, it seems that save is stored in browser. It would be nice if the save could work similarly to save states in the way they seem to automatically upload and become available to select when loading a rom. This would greatly improve cross-device saves as currently I need to remember to download the save using the export save in emuationjs, then upload the file. In a somewhat related request, it would also be nice to have the option to select a save file that a rom would load automatically each time I start a given rom.

Describe the solution you'd like When game is saved, automatically save to server if a save file doesn't already exist. Allow user to select a "default" save file that will load any time they go to play that rom

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

gantoine commented 6 months ago

Currently, when a game is saved, it seems that save is stored in browser. It would be nice if the save could work similarly to save states in the way they seem to automatically upload and become available to select when loading a rom.

This is how it's supposed to behave, there's likely something wrong with your setup. How comfortable are you with the developer console?

In a somewhat related request, it would also be nice to have the option to select a save file that a rom would load automatically each time I start a given rom.

Playing on browser is not this project's main goal, and is mostly an afterthought, a way to let players casually play sometimes.

akambojTC commented 6 months ago

@gantoine I have the same issue of the save not saving on the server most of the time. It seems like it works correctly 1/20 times. I'm happy to try any suggestions that may help debug it.

gantoine commented 6 months ago

Well that's strange, I'd expect it either doesn't work at all, or works all of the times (unless the internet interrupts). Is it still saving a copy to the IndexedDB/browser cache? And can you try seeing what (if any) requests go out on save in the network tab of the dev tools?

akambojTC commented 6 months ago

How do I access the dev tools? Do I need to go through the dev setup?

gantoine commented 6 months ago

I meant the browser dev tools, Web Developer Tools/Developer Tools. Are you familiar with the dev tools and browser console?

akamboj commented 6 months ago

Sorry was on the wrong account before, but this is the same person. I only have a cursory familiarity with the web dev tools, but I'll do my best. In the network tab I see a GET request when the save is loaded, but not when I save. But when I save a state in the emulator I see a message to the "states" endpoint. I do see the .srm save file in IndexedDB /data/saves. This may be a red herring but I have to click "Restart" in the GBA emulator menu for it to appear there.

azerioxal commented 5 months ago

It seems to only save to RomM for me when pressing the menu button. Using the Quick Save keybind only saves to the browser from what I've been able to tell.

EDIT: From what I can see with a quick peek at the code, this looks like this is an issue on the EmulatorJS side. It seems that Quick Saves/Loads don't fire the relevant events.