Ginger Cat Studios's Forum Posts

  • I'm currently migrating my game from NWJS to WebView2 using the Steamworks Addon. I immediately noticed significant improvements in this.

    However, the achievements that appeared in the corner of the screen are no longer occurring, I can still unlock an achievement and even get the sound, but it doesn't appear during the game

    Is this possible? If so, how can it be done?

    I have the correct APP ID for my game and the developer option is disabled, I have already tested with the Overlay option disabled, but the problem persists..

    I'm using Steamworks just like I used Greenworks, executes achievement unlock event with the achievement "name".

  • You should be able to use File System to write files to a folder that Steam Auto-Cloud will sync for you. There's some information on this here.

    In this case, my game starts by pulling an ArrayJson with Ajax to the Array that I will use, and when saving, LocalStorage saves this Array as a Json.

    If LocalStorage already exists, it places the Save from LocalStorage in this Array

    In this example, I have a JsonArray of Save in my game folder, but it is only read by Ajax and used if it is the player's first time, but the part of actually saving the game is using LocalStorage, and the json of this LocalStorage is a mystery, I use the files that are in AppData to be able to save in the Cloud

    In my situation, how could I use the FileSystem? Is it possible for me to save and edit the original Json in the folder? Or create a Json in another location and every time my game saves it goes there and edits it? If it is possible then I just need to give the location of this Json to Steam, but from what I have researched and tried it is not possible to use the FileSystem to edit a json file with what is in the Array.

  • I'm pretty happy with the latest Beta updates, particularly the attention to Steam and Archives.

    I have been using LocalStorage and NWJS to save and load my game on Steam, but I have some problems saving in the Cloud because I need to point to a path and the IndexDB folder in AppData, sometimes it works and sometimes it doesn't, it's a bit confusing.

    I believe a guaranteed way would be to create a Save folder in the local files or somewhere else, and store the LocalStorage Json file inside it, making it easy to locate. I've already tried to do this using FileStorage but without success.

    Anyone who has already tested the improvements in the Beta version, do you know if it is now possible to do this?

    In my mind it would work like this:

    Start Layout-> Check if Save.JSON exists in the Save folder

    If not, it creates the folder and loads an "empty" array of Save.

    If it exists, it loads Save.json into the Array

    After the player saves the game, it saves the Array as Json "replacing" the previous one.

    My game basically works like this, the difference is that when LocalStorage saves the Array as Json, it is not in an accessible location, and apparently it is in a strange format of several files there in Appdata.. If you could save it as a normal, accessible .json file, it would be a huge Game Changer.

    Thanks!

    Tagged:

  • I thank everyone who commented, I am using NW.JS on Steam, the solution to the problem of continuing to run was to replace "Close Browser" to "browser execute javascript: "process.exit(1);"" and the saving in the Cloud is pointing to "User Data\Default\IndexedDB"

    I believe this will solve my headaches with NW.JS

    Ashley But I confess that I am excited about the idea of ​​Construct's own exporter. I wish you success in this plan, and I would like to ask for your attention on this new tool to be able to save and load JSON easily, and that it can be sent directly to Steam without the need to add .dlls and other tasks that we need to do with NW.JS

    Thanks

  • If you can, use the Windows WebView2 export option (and coming soon, the Linux CEF export option) instead of NW.js - long term, we want to phase out NW.js and move to our own exporters, as they're a lot simpler, easier to maintain, and don't tend to have these weird issues that can crop up with NW.js.

    I would like to add an improvement suggestion to your product.. the part of saving the game is a bit complicated, I'm using Array and LocalStorage for this, but the location of where it is saved is a bit confusing, it would be great if in the new way of exporting, you could create, edit and read some JSON without problems, and then when you needed to locate the Save file, you would only need to point to the JSON, without much mystery.

  • If you can, use the Windows WebView2 export option (and coming soon, the Linux CEF export option) instead of NW.js - long term, we want to phase out NW.js and move to our own exporters, as they're a lot simpler, easier to maintain, and don't tend to have these weird issues that can crop up with NW.js.

    Wow, now that I saw your profile, I'm happy to know that you guys plan to improve this export part for Desktop, I'm looking forward to it, congratulations for creating the best Engine ever!!

  • If you can, use the Windows WebView2 export option (and coming soon, the Linux CEF export option) instead of NW.js - long term, we want to phase out NW.js and move to our own exporters, as they're a lot simpler, easier to maintain, and don't tend to have these weird issues that can crop up with NW.js.

    Thanks!,

    The DLL files that need to be placed in the .package and other Steam things, can you do all this without problems using WebView2?

  • I’m looking for tips and tricks for publishing NWJS-exported games on Steam.

    For example, I’ve noticed that sometimes, after closing the game, the NWJS application continues running in the taskbar, preventing the game from being reopened until it fully closes. It's inconsistent—it doesn't happen every time, and I’m not sure what triggers it.

    Previously, this issue occurred almost every other time I tried to start my game. However, in the latest game I published on Steam, it no longer happens. Could this be due to the newer NWJS version or the Steam .DLL files I added? It’s a bit puzzling, haha.

    I’d really appreciate advice from those with more experience publishing Steam games with NWJS. I believe Construct 3 currently only supports NWJS for desktop, but if you know of better methods or have any insights, I’d love to hear them. Your input is valuable to me!

    I wish you a great day!

  • LS location on Windows should be this:

    C:\Users\USERNAME\AppData\Local\game_name\User Data\Default\IndexedDB

    Apologies for the delay, I found a light location of a few kb where the Local Storage is saved, the path is also in Appdata, it's called chrome (and some numbers), Thanks for the help!

  • > I believe what I should do then is create an array and a json within the construct, use Ajax to import the json into the array

    If you need to pre-load some data into the array, then yes - create an array file in the project and load it with AJAX. You don't need NWjs for this part.

    > and then use NJWS to write the array into the json, right?

    If you need to save the contents of the (changed) array in runtime, you can either save it to local storage or write to a disk file with NWjs.

    I was using Local Storage, but I can't find the location where it is saved, this is my main problem actually, I need to be able to find the saved json. I will try to use NJWS to save it in a json that I know where it is.

  • First, you need to add NWJS object to the project.

    NWJS Write Text File action to save.

    Array Load from NWJS.ReadFile("path") to load.

    And of course these will only work in the exported game.

    I believe what I should do then is create an array and a json within the construct, use Ajax to import the json into the array, and then use NJWS to write the array into the json, right?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • construct.net/en/make-games/manuals/construct-3/plugin-reference/nw-js

    See the section in the manual regarding using file paths correctly on the NW.js page.

    It recommends writing to NWjs.UserFolder & "myfile.txt", however I would additionally recommend putting it in a directory unique to your game, as well as saving the file as .json if you'll be saving data in json format. Alternatively, use an obfuscated/unique/encrypted format you are familiar with.

    You want to use the NW.js Write text file action, with your array.asJSON as the content to write. Or whatever else type/format of data you're saving. Dictionary.asJSON works well as well, and is more similar to LocalStorage in terms of keys and values. Save to your dictionary as you normally would have to LocalStorage, with the additional step of writing the dictionary to disk as a file through NW.js when desired.

    To load, you can use the ReadFile() expression (into your load dictionary or load array action). You can get information about the file location with the NW.js action List files along with the UserFolder, ListCount, and ListAt() expressions to confirm and validate the existence of save files.

    Thank you!

  • Try searching the forum, there were a few posts about this.

    https://www.construct.net/en/forum/construct-3/general-discussion-7/nwjs-save-games-local-storage-178282

    Thanks Dop, I've seen many of your answers here, and I believe you've already answered other questions of mine, congratulations on your dedication to helping others.

  • I'm using Array and Local Storage to save the player's settings and progress as Json, it's working correctly, but I would like to know where this json file is that is saved, I need to know the path so I can edit it or send it to Steam to save it in the Cloud, but I can't find it anywhere, does anyone know where it is?

    I am using NW.JS to export

  • Hello, I'm redoing my game on Steam because of the way it saves, I was using the game's save state and on Steam I sent the entire Appdata folder to the Cloud, this works, but the obvious thing happened, if I perform updates, old players will continue on the version they played the first time.

    So I'm remaking my game the right way, using Local Storage and Arrays, it's saving smoothly. However, I can't find the json file that my Local Storage saves anywhere.

    I found some people saying to use the NWJS object and create a folder to save it, but I didn't find any information or an exact tutorial on how to create, save the json and then load it in the same way that Local Storage does.

    Does anyone who uses NWJS to export games to Windows know how I can save my games in a JSON and load them? And of course, I can work on it, for example after loading send it to my array.