How do I change default loader window resolution for nwjs?

0 favourites
  • Like the title says, I need to change the default loader window size to a higher resolution. It's possible, I just don't know how. Something in index.html or c2runtime.js maybe? Help?

  • Am I correct in saying you just want the window to just start off in a fixed height and width? but its not doing that?

  • Yeah the initial loader window is set to something like 350x280 resolution and then when the loader layout starts out the game goes fullscreen like it's supposed to. That's normal behaviour right?

  • Erm I'm not 100% sure it supposed to go full screen but i'm 50% sure its suppose to scale to the users input resolution of the canvas. Do you want it to just not do the scale up thing and just want to instantly launch fullscreen. I'm not fully understanding your question my friend.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh okay, so the loader window is supposed to be set to Window Size from the project settings? That's not what's happening here. I have fullscreen set to Letterbox Scale but the runtime still starts out in a small window until it's finished loading. And yep, I want it to start in fullscreen right away.

  • http://www.filedropper.com/showdownload.php/fullscreen-test ErekT Like this? Is the issue the slight lag between going fullscreen? Because I don't know how to fix that.

  • Yeah, for a split second there I see a window that then gets blown up to fullscreen. Ideally I'd like to have it run at fullscreen immediately but I know there's a way to customize the resolution for that loader window too. I've seen it done before in the C2 game The Last Penelope. Thanks for helping out btw

  • C:\Program Files\Construct 2\exporters\html5\nwjs <- Found the manifests where I'd assume you'd edit to tell it fullscreen but I don't know how. Hope that's some help. Sorry

  • ErekT ^ Sorry forgot to tag

  • Hmm, I tried changing width and height in the different json files but it didn't make a difference. Good guess tho, thanks I think I'll try to contact the guy who made Last Penelope next and ask how he did it.

  • Ashley could you help here? I have no idea where to begin!

  • Would using this export option do the trick?

    Kiosk mode:

    use a "kiosk" display mode, where the app runs in fullscreen and tries to prevent the user from leaving.

  • I'm already using it :-/

    This is what I get before going fullscreen:

    ... and this is The Next Penelope using a custom res:

  • This?

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

    Or maybe you could set the window transparant and add an Image?

    in your html body, specify the alpha of the background colour, in my example below, I set it to be full transparent

    <body style="background-color:rgba(0,0,0,0);">

    you can set the window's transparency "on the fly" using

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

    var win = gui.Window.get();

    win.setTransparent(!win.isTransparent);

    you can also specify it in package.json

    "window": {

    "transparent": true

    }

  • I messed around in package and package-win.json quite a bit with nothing happening. Not a sausage. But then I remembered; my project uses the node-webkit object and not the nwjs object! They're functionally identical as far as I know but only nwjs will access package-win.json in the nwjs folder obviously. Hoo man. Now it works.

    Thanks for all the help

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