gfmichels's Forum Posts

  • You shouldn't use Local Storage with Steam Cloud. Use File System writing to a dedicated folder.

    If your game already uses Local Storage, you probably want to set up something like the following for backwards compatibility: use File System to write to a dedicated folder for Steam Cloud, but also check Local Storage for any older saves made that way, but don't save any new data to Local Storage.

    I managed to save a json in the documents folder and then load it if it exists. I'm very happy, and more ambitious now..

    It is now possible to export using WebView2 for Linux with Steamworks, in my case I use the tag for documents, in a Linux situation can I use the same tag or should I save the json in another specific Linux location?

  • I did it, I did it, I feel like Christopher Columbus haha

    the solution:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm able to save now, in the example I'm using the Documents folder:

    The problem now became how can I load this saved file into documents..

    I was thinking about a logic to check if the file exists, if it exists it loads it into the Array, if it doesn't exist, it uses AJAX and loads the "Clean Array"

    However, I don't know which expression to use, AJAX would load the latest data, but the filesystem doesn't have that choice.

  • I created a Json(VisualArray), and using AJAX I put it in a real Array, which I use in my game.

    The problem is how to transform this Array back into a Json and save it in the original file.

    I'm using WebView2, so I have access to my JSON file in the www folder. I believe I can do this using FileSystem, but I was not successful.

    Here's what I did, did I miss something?

    Tagged:

  • You shouldn't use Local Storage with Steam Cloud. Use File System writing to a dedicated folder.

    If your game already uses Local Storage, you probably want to set up something like the following for backwards compatibility: use File System to write to a dedicated folder for Steam Cloud, but also check Local Storage for any older saves made that way, but don't save any new data to Local Storage.

    Sure, I created this example to test the use of FileSystem, but it didn't work, am I missing something?

    I created a Json file (VisualArray) where the values ​​will be stored, then using Ajax I load this Json (VisualArray) into my Real Array, when saving the game, I save the Array in Json format in the original Json file.

  • Valve say it should just work, and there is virtually no control the game has over the Steam Overlay - the only API functionality is to ask to show the Steam Overlay (there isn't even a way for the game to ask to hide the overlay). The display and interactivity of the Steam Overlay is handled entirely by Steam which is made by Valve, so if you have any issues with it, you should contact Valve.

    Sure, I'll contact Valve support.

    Before that, just to confirm...

    In the Steamwork Addon, I put the App ID of my game, the Overlay mode enabled and the Developer mode disabled.

    and in my event sheet, at the moment the player will earn an achievement I put the Steamworks action [Unlock Achievement]

    When exporting, I use the WebView2 option and send it directly to Steam..

    I missing something?

  • 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!