The Big NW.js Roundup - News & Tips

From the Asset Store
Jump over the small square and avoid hitting it as long as you can!
  • jobel here is a quick list of problems that started when I upgraded:

    • Firstly a lot of issues with opening local folder saves, once every 4 or 5 saves it tells me I don't have permission to save to that folder, but if I keep trying it eventually works. Tried multiple projects and locations and still get the issues.
    • Previewing just gives me a black screen about 30% of the time, so I have to restart everything.
    • Putting the app into fullscreen no longer seems to work on a trigger, as I'm making games for desktop then I have a function which sets the application to fullscreen on startup. This has worked for years but now doesn't. I even made a small file with a single 'on start of layout' event to set the application fullscreen. This works on the browser version of C3, but not in nwjs.
    • Finally I am seeing some weird visual issues, like hidden objects showing for a single frame when the application first previews.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • jobel here is a quick list of problems that started when I upgraded:

    • Firstly a lot of issues with opening local folder saves, once every 4 or 5 saves it tells me I don't have permission to save to that folder, but if I keep trying it eventually works. Tried multiple projects and locations and still get the issues.
    • Previewing just gives me a black screen about 30% of the time, so I have to restart everything.
    • Putting the app into fullscreen no longer seems to work on a trigger, as I'm making games for desktop then I have a function which sets the application to fullscreen on startup. This has worked for years but now doesn't. I even made a small file with a single 'on start of layout' event to set the application fullscreen. This works on the browser version of C3, but not in nwjs.
    • Finally I am seeing some weird visual issues, like hidden objects showing for a single frame when the application first previews.

    Please report all C3 editor related issues on GitHub. Scirra still looks into them, even the NWjs related ones. Make sure to provide all the info they need.

  • Thanks all, with Danny and Skymen's help I was able to get Overlay working again :)

  • TheRealDannyyy I've been trying to see if i can export nw.js and utilize the transparent window feature -http://docs.nwjs.io/en/latest/For%20Users/Advanced/Transparent%20Window/

    I'm hoping to make an overlay with elements on top of the users desktop as if the background of the app is see through. But i'm not having much luck.

    I've tried modifiying the package.json and package-win.json files in the C2 exporter folder by adding

    "frame": "false",

    "transparent": "true",

    but according to that page i need to edit the HTML body as well to specify the background color, but not sure where to adjust that.

  • TheRealDannyyy I've been trying to see if i can export nw.js and utilize the transparent window feature -http://docs.nwjs.io/en/latest/For%20Users/Advanced/Transparent%20Window/

    I'm hoping to make an overlay with elements on top of the users desktop as if the background of the app is see through. But i'm not having much luck. ...

    This is fairly easy to achieve but it comes with some limitations. You basically need to add "transparent": true to the window options and disable the window frame while exporting. Then you have to set the layer background in Construct 2/3 to transparent: Yes. You can now either set the body tag CSS code manually or execute some JS (might not work in C3).

    Code to make body transparent:

    "$('html,body').css('background','rgba(0,0,0,0)');"
    

    I did this example project a while back. Making it click-through is a bit more complicated. It requires you to disable GPU rendering, which will kill performance but I guess this won't matter if you make some sort of software. It's all up to you really, feel free to play around and ask more questions.

  • Thank you for the example file It works great in C2.

    Clickthrough works great, but the window gets sent behind the new window you clicked on. It there a setting/flag for "always on top"?

    Where do I find the package.json file for C3 Exported projects?

    I read in another thread about unzipping the package.nw file, adjusting the files in there, then rezipping it. But once i do that the .nw file doesn't work anymore. NW.JS only opens its default loading screen after adjusting that file.

    Thx for the help with this.

  • Clickthrough works great, but the window gets sent behind the new window you clicked on. It there a setting/flag for "always on top"?

    There should be an action for that inside the NWjs addon.

    Where do I find the package.json file for C3 Exported projects?

    With C3 you have the option to uncheck "package assets" and access it that way or as you already mentioned, rename "package.nw" to "package.zip" and edit it that way.

    NW.JS only opens its default loading screen after adjusting that file.

    Rememeber to name it back to "package.nw" after you're done. Also make sure that your package.json file has valid json code.

  • TheRealDannyyy - Thanks, Got the "always_on_top": true, working.

    One final question. Is it possible to enable/disable the click-through feature while the app is running? I'm thinking since its enabled with the chrome flag via a shortcut there might not be a way of doing that while the app is running?

  • TheRealDannyyy - Thanks, Got the "always_on_top": true, working.

    One final question. Is it possible to enable/disable the click-through feature ? I'm thinking since its enabled with the chrome flag via a shortcut there might not be a way of doing that while the app is running?

    Not aware of it. I think it requires a complete app restart to work, so I doubt it.

  • Well this will be a great start at least. Thanks again.

    I know C2 stores the default package.json that it uses to compile each time. Does C3 keep a default one somewhere so you don't have to edit the file each time you export?

  • I know C2 stores the default package.json that it uses to compile each time. Does C3 keep a default one somewhere so you don't have to edit the file each time you export?

    I think C3 generates that file on the fly while exporting. You should create a topic in the C3 section of the forum and ask the Scirra team directly.

  • Hi all, I have a topic on the main C3 board, but perhaps I should have just asked in here... how do you all get your games to start in fullscreen on desktop? The method I have used for the past few years doesn't work anymore. Is there an Chromium arg for this?

  • Hi all, I have a topic on the main C3 board, but perhaps I should have just asked in here... how do you all get your games to start in fullscreen on desktop? The method I have used for the past few years doesn't work anymore. Is there an Chromium arg for this?

    Depends on the type of fullscreen you want. "Kiosk mode" can be selected while exporting, which forces the game to be in fullscreen forever. Default fullscreen can be achieved by simply running the Browser action "request fullscreen" on start of your 1st layout (ideally based on in-game settings).

  • Default fullscreen can be achieved by simply running the Browser action "request fullscreen" on start of your 1st layout (ideally based on in-game settings).

    TheRealDannyyy that's exactly what I have always done, it has worked for a long time but it no longer does. I submitted a construct bug which was immediately closed as 'not a bug'. Perhaps this is a new problem for all of us exporting to desktop.

  • > Default fullscreen can be achieved by simply running the Browser action "request fullscreen" on start of your 1st layout (ideally based on in-game settings).

    TheRealDannyyy that's exactly what I have always done, it has worked for a long time but it no longer does. I submitted a construct bug which was immediately closed as 'not a bug'. Perhaps this is a new problem for all of us exporting to desktop.

    Please link to the report. Might be one of those days for the Scirra Team.

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