gfmichels's Recent Forum Activity

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

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • Forget it, I found a mathematical formula that solves this.

  • Check out these examples:

    https://howtoconstructdemos.com/category/slide-bar/

    Note, that for volume you'll need to use log10() expression:

    https://www.dropbox.com/scl/fi/5e5kyap5eqq6g7u1kfksb/VolumeSlider.c3p?rlkey=v8wsfcpi8nw7ntay3qpciod2o&st=hmioppkn&dl=0

    Thanks for the example,

    But using sprite, where the marker for example goes from X:335 to X:575, how could I convert these values ​​to decibels?

gfmichels's avatar

gfmichels

Member since 1 Jul, 2024

None one is following gfmichels yet!

Trophy Case

  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

3/44
How to earn trophies