Node Webkit fullscreen

Get help using Construct 2

Post » Thu Oct 29, 2015 10:25 pm

Hi everyone.

I heva a problem with Node Webkit. When I preview my game in full screen, I'm getting huge FPS drops, but when I make my window slightly smaller everything works perfect. I don't have this problem when I play in internet browsers, only when I try to play on Node Webkit. I want to publish this game on Windows, MAC and Linux, but with this frame rate in full screen, I just can not. :cry: So what can I do?
B
3
Posts: 3
Reputation: 181

Post » Thu Oct 29, 2015 10:32 pm

Try removing the windows border and doing a full-screen border-less window.

Code: Select all
{
   "main": "[[[previewurl]]]",
   "name": "[[[name]]]",
   "window": {
      "toolbar": false,
      "width": [[[width]]],
      "height": [[[height]]],
      "position": "center",
      "show": false
   },
   "node-remote": "[[[remotehost]]]",
   "dom_storage_quota": 50,
   "user-agent": "Mozilla/5.0 (%osinfo) AppleWebKit/%webkit_ver (KHTML, like Gecko, Chrome, Safari) NWjs/%nwver",
   "chromium-args": "--disable-extensions --disable-plugins --disable-internal-flash --disable-popup-blocking --enable-gamepad --enable-html5-camera --allow-file-access-from-files --disable-software-rasterizer --ignore-gpu-blacklist"
}


Replace your:
C:\Program Files\Construct 2\exporters\html5\nwjs\package-preview.json

with the above code, and you can test it without borders. Be sure to set the window X and Y to 0, and the resolution you desire.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Fri Oct 30, 2015 3:49 pm

Hi and thank You for quick answer.

I don't see any difference between my original code and yours. I replaced it, but it didn't make a difference.
Where do I set the window x and y, and resolution? In my C2 project settings, or should I write it somewhere in the code?
If in the code I don't really know how. I never edited any codes before. Please help.
B
3
Posts: 3
Reputation: 181

Post » Fri Oct 30, 2015 3:55 pm

Code: Select all
{
   "main": "[[[previewurl]]]",
   "name": "[[[name]]]",
   "window": {
      "toolbar": false,
      "width": [[[width]]],
      "height": [[[height]]],
      "position": "center",
      "frame": "false",
      "show": false
   },
   "node-remote": "[[[remotehost]]]",
   "dom_storage_quota": 50,
   "user-agent": "Mozilla/5.0 (%osinfo) AppleWebKit/%webkit_ver (KHTML, like Gecko, Chrome, Safari) NWjs/%nwver",
   "chromium-args": "--disable-extensions --disable-plugins --disable-internal-flash --disable-popup-blocking --enable-gamepad --enable-html5-camera --allow-file-access-from-files --disable-software-rasterizer --ignore-gpu-blacklist"
}


sorry try that,
the "frame": "false", is the part you need to add is all.


The X and Y are thing you set inside construct, also the window width and height should reflect your desired resolution.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Fri Oct 30, 2015 5:59 pm

OK I made my full-screen border-less node-webkit window, but it didn't help.

On web browsers with border-less windows and full screen I get 60 fps, but on node-webkit with full screen normal window or border-less window around 45, and looks really choppy.

Is there anything else I could try?
B
3
Posts: 3
Reputation: 181

Post » Fri Oct 30, 2015 6:16 pm

ziomek wrote:OK I made my full-screen border-less node-webkit window, but it didn't help.

On web browsers with border-less windows and full screen I get 60 fps, but on node-webkit with full screen normal window or border-less window around 45, and looks really choppy.

Is there anything else I could try?



It may because of Vsync? i am not sure. The reason I suggested border-less window is Aero will automatically do the vsync. This is great for games because you dont get the mouselag associated with Vsync.

People with Windows XP will not be as happy though, they need to have the fullscreen with Vsync.

Try benchmarking most modern games on your computer with fullscreen+vsync, then benchmark with only borderless window, and NO vsync... You will probably notice a big differance in not only frame rate, but with mouse lag when you are actually playing the game.

This is just a guess about Node web-kit. I am not sure if it automatically does V-sync with fullscreen or not.

maybe just do a border less window for people with Windows 7+ and A fullscreen Vsync for people with windows XP?
B
29
S
8
G
4
Posts: 767
Reputation: 5,985


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], littlesaigon2, MrOmar230 and 4 guests