Question on "save game" file save location IOS

Discussion in 'Learning Javascript' started by ACECORP, Feb 5, 2019.

  1. ACECORP

    ACECORP Founder & Entrepreneur Veteran

    Messages:
    253
    Likes Received:
    38
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    When RMMV saves the game on a windows device, I believe the "save game" files such as file1.rpgsave, file2.rpgsave, etc are, by default, saved in the same folder as the compiled game.exe file, correct?

    What I need to know, is where is this default "save game" folder when the game is exported for IOS and compiled in cordova/Xcode as gamename.app?

    I have been using cordova-file-plugin to try and find it, and have been unsuccessful. It does not appear to save to www/save nor does it appear to save to /Documents or /Documents/save

    I even tried to find them by using Xcode as described HERE but the expected files of such as file1.rpgsave, file2.rpgsave, etc. are not present in any of those directories after I've saved my game a bunch of times.

    The IOS file system layout is below, and I would be very grateful if anyone know exactly where they get saved by default.

    IOS_FileSystem.png
     
    #1
  2. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,520
    Likes Received:
    959
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Any deployment that is not a desktop deployment uses the Browser's local storage for the save file. It's not stored as a separate file, but rather as string data within the browser (which in this case is Cordova). Here's information on localStorage which is an implementation of the Storage interface.
     
    #2
  3. ACECORP

    ACECORP Founder & Entrepreneur Veteran

    Messages:
    253
    Likes Received:
    38
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks! You are the man! Looks like I got my work cut out for me since I am gonna have to play around with
    localForage, PouchDB, and/or LokiJS. Have you used any of these with RMMV apps? Any recommendations or preference? localForage seems like it may be the easiest. Thoughts? I need to make the data back-up-able to the cloud and getting control over it via localForage w/SQLLite plugin seems like the easiest and quickest. Any thoughts and/or recommendations?
     
    #3
  4. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,520
    Likes Received:
    959
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Never used any of those in general. But I'm not quite sure what you're asking, you want to store the savedata (the string) to the cloud?
    Do you already have a server set up that can receive the string and store it in a database?
    How are you going to identify a unique player so you know which string is theirs?
    Are you going to send the data while the game is open?

    If you're sending data when the game is open, you could, for example, add a function that gets called when the player saves that sends an HTTP request to your server with the string as the body of the HTTP request.
     
    #4
  5. ACECORP

    ACECORP Founder & Entrepreneur Veteran

    Messages:
    253
    Likes Received:
    38
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks. Not yet as far as save to cloud yet. Was just wondering if anyone used localforage w/ SQLite plugin for storing locally to SQLite instead of Cordova web browser local storage and what their experience was - if it’s good to use. It looks like it will work well, then I’ll sync the SQLite with the cloud system I set up. That’s kind of my plan.
     
    #5

Share This Page