Quicksand's Forum Posts

    Is the nwjs team even aware of the problem yet?

    I don't think so. We could report the issue here:

    https://github.com/nwjs/nw.js/issues

    But if the gui.App.quit(); command works properly, which it seems to, then it seems this would be something to fix in Construct rather than in NW.JS.

  • >

    > > It's designed to stop the game running while you go back to edit it further in Construct 2. Why would you want that after publishing?

    > >

    >

    > Because people tend to multi-task on computers and so its nice to have the game automatically pause events and especially sound when one clicks on a different window.

    >

    > Thanks for the info.

    >

    What about timescaling?

    Check if the game is out of focus, when it is just set it to 0.

    The browser plugin has all the conditions you need for that.

    I tried that but it doesn't seem to work when NW.JS is used as the ersatz browser. Unless I just had it set up wrong.

    Anyway modifying the runtime code myself worked, its just not the most convenient way of going about this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • According to the store page "Once you make more than $5,000 USD revenue (or equivalent) from your creations you must upgrade to Business Edition."

  • It's designed to stop the game running while you go back to edit it further in Construct 2. Why would you want that after publishing?

    Because people tend to multi-task on computers and so its nice to have the game automatically pause events and especially sound when one clicks on a different window.

    Thanks for the info.

  • Ashley could you explain why the feature was restricted? I'll be releasing my game soon and I don't want to keep that in if it causes known issues.

    doable... but I prefer hide windows frame in order to avoid user to close the app by clicking on window's X

    That's the solution I'm using for my game for now. And I've managed to get it so that you can drag the window by its border while still being able to click within the window normally, without dragging it. Now the only worry is if someone right clicks on the game in the taskbar and closes it that way (I have a message telling the player not to, but that's not ideal).

    Ok so if I understand correctly you've modified the NW plugin to have a "close app" action. But to me there should be a way for the basic behind-the-scenes runtime scripts to automatically incorporate that action when the window's X is clicked.

    I don't really know Javascript at all but I think it should be something sorta like this:

    var win = nw.Window.get();

    "var gui = require('nw.gui');

    nw.Window.get().on('close', function() {

    gui.App.quit();

    }

    Closing the game seems to work properly (and not leave behind background processes) with having the Browser object execute the Javascript code "var gui = require('nw.gui'); gui.App.quit();". Can anyone else confirm that?

    If so maybe there is a way to work that in so that NW.JS will automatically execute that code on the window close event.

  • I worked on the problem today and I got the feature working by simply changing the part of the code that disables it when not in preview mode (in preview.js). But I'm still left wondering if there's a good reason why it was disabled in the first place. Can't be that it doesn't work, glerikud, since it does now (for NW.JS at least).

  • Looks like someone here is having the same issue: https://github.com/nwjs/nw.js/issues/4493

  • Mind uploading the exported game (win32 please)? I want to take a look but I don't want to install the new NW.JS until these sorts of bugs are ironed out.

    If you open the exported game's package.nw file (it can be read as a zip file) and then open the package.json manifest (can be read as a txt file) you can see what the starting width and height of the game are set at. You can also add a maximum width and maximum height to that file.

  • I'm wondering why the project setting "Pause on unfocus" is specified as only available during preview? I'd like to have that feature as part of my exported NW.JS app.

    Maybe there's another way of achieving the same thing? Any way to do that by editing the code itself? I think I found the relevant part in the preview.js script but I have no idea how to get it into my exported game's data.

    Has anyone tested this issue with the new NW.JS builds released today?

  • Why not just have the physics behavior disabled until the collision enables it?

  • Whatever you have set for the normal Construct 2 loader will always show up until the loader layout is itself loaded.

    To turn off the loader layout just delete or move it in the layout list, then in the project settings change the 'Use loader layout' setting to 'No'.