Set window size on launch when using Node-Webkit?

  • Is there a way to set the size of my window when launching my game that has been exported with Node-Webkit?

    My window and layout size settings in Construct 2 are set pretty small, since I am using pixel art. When I export with Node-Webkit and then launch, it starts out pretty small. Its not a big deal for me to just resize the window, but it would be nice to have something a little more professional. Like an option before it launches to set the window size, or say if I want it full screen or not.

    Does anyone know of way to do this? Thanks.

  • There is a way to link a key to make the window fullscreen, like the "F" key.

    I don't know precisely how to do what I am about to propose since I haven't attempted it yet, but I assume that you could make a trigger where, at the start of the layout, a text box appears asking if you would like fullscreen. If the person selects "yes," yes could be made to be the equivalent of pressing "F," and would therefore (theoretically) make the window fullscreen.

    I might be way off base here, but it seems plausible to me.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's a 3rd party node webkit plugin that allows you to change the window size, but you can't retrieve the screen size to position it in the center...Ashley's been talking about an official node webkit plugin for this stuff for ages but I haven't seen anything...

  • Guys,

    On Start of layout, Browser -> request full screen worked the last time I checked node webkit and I was fairly impressed with it.

  • Yeah, but still needs a way to resize to a specific size you want and potentially lock it in that size to allow only specific sizes when it's not fullscreen.

    I have a game that is Gameboy resolution (because I can) and you have to manually resize it to be bigger. I would love to have a 1x,2x,3x,4x,fullscreen option for it.

  • You could just scale up your graphics to the appropriate size but I get what you mean. It would be a nice option.

  • Cool, thanks for the replies everyone. I will try some of those suggestions out. Genki, Maybe that request full screen request will work.

    My buddy pointed out the layout scale function, which I didn't know about before, but has worked well for just getting my game to boot up at a decent(presentable) size.

    I guess if you are running the game in windowed mode, its not a big deal to just resize the window to whatever size you want, but it would be nice to give the player the option to switch to FullScreen mode and back from within the game/menus.

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