vaporBoy icon indicating copy to clipboard operation
vaporBoy copied to clipboard

Allow All User Data to be synced and saved : Create a backend / server

Open torch2424 opened this issue 6 years ago • 6 comments

Like allow exporting everything out of indexed db into a large Jon object, and saved as a file, or synced to a service. This will allow for cross device saves and things :)

https://www.npmjs.com/package/gdrive-appdata

torch2424 avatar Oct 12 '18 16:10 torch2424

Saving to file and saving that file works, but it is quite annoying to have to do the step manually.

Perhaps we can just host some sort of db on firebase? Since it is just Json data. Syncing to Google drive doesn't have good options, module I linked above seems awkward :p

torch2424 avatar Oct 19 '18 02:10 torch2424

So just a bit more context on this:

Didn't create one at first, as I wanted to project to be able to be hosted / shared by anyone as just a frontend only application. And didn't want to have a single place where this can be taken down (Even though this app does nothing illegal, still wanted to play it safe).

But after much though syncing with auth would be suuupppeeerrr awesome and just make this thing perfect. And if we are going to ever accomplish Link Cable Emulation this will have to happen.

Thus, I often see PouchDB and is mentioned by This Chrome dev article. At first, was a bit put off by CouchDB, but I found out they have a really nice all-in-one server and express module. Where auth support can be done here

torch2424 avatar Feb 16 '19 06:02 torch2424

In terms of hosting the server, paying for glitch seems like a really quick and easy way to setup everything, and even has a pouch example:

https://glitch.com/~pouchdb-server

torch2424 avatar Jul 08 '20 00:07 torch2424

Maybe before getting into specifics like hosting, it's best to take it one step at a time. Like, exporting saves could be done before any of that. I've never used idb before or have experience with gameboy architecture, so I don't know how well I could contribute

vegerot avatar Jul 20 '20 22:07 vegerot

@vegerot Yeah definitely!

So in your case, you could use the WasmBoy API to get the save states: https://github.com/torch2424/vaporBoy/blob/master/src/services/ROMCollection.js#L59

And then add a button to turn that save states object into JSON? :smile: And then add a button to load that JSON file to add the save states back into IndexedDB :smile: Proabably in the control panel: https://github.com/torch2424/vaporBoy/tree/master/src/components/controlPanel

torch2424 avatar Jul 21 '20 18:07 torch2424

In progress :p

vegerot avatar Aug 14 '20 14:08 vegerot