Save and Load Level (Local game folder)

0 favourites
  • 5 posts
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • hi, I'm creating a level editor game, and the whole scenario will be saved in array, and the scenarios will be shared among the players in the world, I use ajax to load the first array already configured in the project files and so that's it new changes so i save them to local storage, but i would like to know how i do it so instead of saving to local storage i want it to save in a level.json file inside the game folder and load it whenever a level is detected in folder

  • Currently is not supported you can only read from the files folder.

    However, if the Game is for Pc you could use Nw.js which supports (Read & Write) directly to your PC

    An alternative you can store it in a server and then (load & Save) directly to your server

  • Currently is not supported you can only read from the files folder.

    However, if the Game is for Pc you could use Nw.js which supports (Read & Write) directly to your PC

    An alternative you can store it in a server and then (load & Save) directly to your server

    is there any free server to store these files and how could i make this happen can i create a c3p please?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • > Currently is not supported you can only read from the files folder.

    >

    > However, if the Game is for Pc you could use Nw.js which supports (Read & Write) directly to your PC

    >

    > An alternative you can store it in a server and then (load & Save) directly to your server

    is there any free server to store these files and how could i make this happen can i create a c3p please?

    I believe they are if you look on Google, I cannot recommend you any I'm afraid as I use private paid servers though maybe someone sees this post and can recommend you any good ones.

    Though even if you find one you will still need to do some configuration ... like allow CORS etc...

    To connect to your servers and download the JSON file you need to use AJAX:

    On Start of layout:

    AJAX Request URL "https://yourserver.com/yourfile.json"

    Wait for the previous action to complete

    Array Load from AJAX.LastData

    An alternative without servers put the file into the files folder as you mentioned:

    Then the first time they run the game save it in local storage

    You can make two copies if you need to:

    1-One for the players that they can change it

    2-To have your original copy

    same thing as you trying to do saving into the files folder but you save into the Local storage instead.

  • > > Currently is not supported you can only read from the files folder.

    > >

    > > However, if the Game is for Pc you could use Nw.js which supports (Read & Write) directly to your PC

    > >

    > > An alternative you can store it in a server and then (load & Save) directly to your server

    >

    > is there any free server to store these files and how could i make this happen can i create a c3p please?

    I believe they are if you look on Google, I cannot recommend you any I'm afraid as I use private paid servers though maybe someone sees this post and can recommend you any good ones.

    Though even if you find one you will still need to do some configuration ... like allow CORS etc...

    To connect to your servers and download the JSON file you need to use AJAX:

    On Start of layout:

    AJAX Request URL "https://yourserver.com/yourfile.json"

    Wait for the previous action to complete

    Array Load from AJAX.LastData

    An alternative without servers put the file into the files folder as you mentioned:

    Then the first time they run the game save it in local storage

    You can make two copies if you need to:

    1-One for the players that they can change it

    2-To have your original copy

    same thing as you trying to do saving into the files folder but you save into the Local storage instead.

    Thank you very much, I will research but if anyone knows please help me I am sweet in pure php, html programming etc....

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)