0 Favourites

Options when I load a file JSON from "Files" folder

  • Hello, please I have some JSON files in the "Files" folder of my game.

    I need to load them into a tilemap object.

    What are my options?.

    Is AJAX the only option?

    I do not like AJAX because you must first "Request" and then check when it ends.

    So these are two actions.

    However, using NWJS you just have to do NWJS.ReadFile and you already have the file loaded in a single action.

    The problem is that I do not know how to refer to the "Files" directory to use NWJS.ReadFile and to be able to read a file from the "Files" directory using NWJS.

    My game will be distributed using NWJS for PC.

    ----------------------------

    Another question is:

    How do I move files from the "Files" folder to user's folder on his pc?

    This can be done with NWJS using the "Move file" action but... how do I reference the "Files" directory ?.

    What I want is that when the player installs my game, those files are moved to a directory on the user's PC.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Please.

    When the user installs my game, how do I find out the path of the folder where the user has installed the game ?.

    Ok, the installation path of the game is obtained with the variable "appfolder" of the plugin NW.js

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