Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Saves not saving to server #786

Open
TheCyberQuake opened this issue Apr 3, 2024 · 14 comments
Open

[Feature] Saves not saving to server #786

TheCyberQuake opened this issue Apr 3, 2024 · 14 comments
Labels
bug Something isn't working emulatorjs Emulator.js bugs or feature requests

Comments

@TheCyberQuake
Copy link

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.

@TheCyberQuake TheCyberQuake added the feature New feature or request label Apr 3, 2024
@gantoine gantoine changed the title [Feature] Feature title [Feature] Saves not saving to server Apr 3, 2024
@gantoine
Copy link
Member

gantoine commented Apr 3, 2024

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
Copy link

@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
Copy link
Member

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
Copy link

akambojTC commented Apr 15, 2024

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

@gantoine
Copy link
Member

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

@akamboj
Copy link

akamboj commented Apr 17, 2024

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
Copy link

azerioxal commented Apr 26, 2024

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.

@gantoine gantoine self-assigned this Apr 26, 2024
@gantoine gantoine removed their assignment Aug 29, 2024
@Savanta
Copy link

Savanta commented Oct 21, 2024

For me it's not saving no matter what I do.
Quicksave/manual save/save state nothing is persistant doesn't matter if keybind or manual button

@ItsNoted
Copy link

ItsNoted commented Dec 10, 2024

Quick save saves to the current session only. This is nice because it wont continue to eat space. If you want to save to the server and pick up where you left off, you currently have to tap the hamburger menu while in game then tap the white disk icon at the bottom. This will save your state to the server. Hope this helps and I really hope @zurdi15 can shed some light on perhaps adding a keybind option to save state rather than quick save only. Also maybe adding load saved state as a keybind.

@Savanta
Copy link

Savanta commented Dec 11, 2024

Where is this disc?
Screenshot 2024-12-12 at 00 33 47

@gantoine
Copy link
Member

third icon bottom left, the floppy disk 💾

@gantoine gantoine added bug Something isn't working emulatorjs Emulator.js bugs or feature requests and removed feature New feature or request labels Dec 24, 2024
@jasonajack
Copy link

jasonajack commented Jan 14, 2025

Might be related to #769 but when saving in game (not using quick saves or save state icon from the menu) is the expected behavior to have it be sent back to the server? Using the browser developer tools / network analyzer in both Firefox and Chrome I did not see any network activity when a game is saved or when the EmuJS is terminated. Is it expected that in-game saves will not store to the server?

@jasonajack
Copy link

I figured out that clicking the "Export Save" button is what does the trick. The buttons within emulatorjs seem to be the only way to handle system saves and save states, though I'm not sure how to adjust save state slots.

@gantoine
Copy link
Member

The buttons within emulatorjs seem to be the only way to handle system saves and save states

This will likely change when #1497 ships in 2-3 weeks.

though I'm not sure how to adjust save state slots.

there's an option in the ⚙ menu, bottom right corner of the emulatorjs player

@gantoine gantoine pinned this issue Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working emulatorjs Emulator.js bugs or feature requests
Projects
None yet
Development

No branches or pull requests

8 participants