Previewing or exporting to nw.js makes the game run at 30fps

Get help using Construct 2

Post » Fri Aug 28, 2015 11:49 am

Why is the game running at 30 fps when i use nw.js? It doesn't seem to be lagging or anything. It just seems to be capped at 30 fps. It's a simple game so far, so there's no reason for it to be lagging or anything. When i preview in firefox or chrome, the game runs at 60 fps perfectly. Also I think it's a new problem, since I only noticed it because the scrolling has become much less smooth. I remember when I used to preview in nw.js all the time, the scrolling would be smooth.
B
4
S
1
Posts: 9
Reputation: 268

Post » Fri Aug 28, 2015 12:10 pm

What version of C2 and NWjs are you using?
Have you got an example we can test?

I have always found that previewing using NWjs is generally better than browser previews, with a rock steady 60 FPS.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,544
Reputation: 60,432

Post » Fri Aug 28, 2015 12:18 pm

nw.js: 0-12-0
construct 2: 204.2

What would I need to post from the nw.js export to show you an example?

Also, again, I'm 90% sure this is a new problem. I tried reinstalling the nw.js version that i have, but that did nothing. I'm gonna try updating it.

Edit: I think I had the latest version posted on scirra, so reinstalling it again did nothing. Also, it's not lag or anything. It just seems like it's capped at 30.
B
4
S
1
Posts: 9
Reputation: 268

Post » Fri Aug 28, 2015 12:48 pm

I've tried other games and templates and the problem persists in those too ( shoulda tried from the beginning I know..). So the problem is definitely in nw.js or construct 2.
B
4
S
1
Posts: 9
Reputation: 268

Post » Fri Aug 28, 2015 1:12 pm

First thing I would do is update to the latest stable release - r212.2.

The version you are using is a bit long in the tooth, and bugs could have been fixed since then.

As an example, I loaded the Space Blaster demo in C2, set preview to NWjs, added a text object to the UI layer and set it to display FPS, and it showed a steady 60 FPS .
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,544
Reputation: 60,432

Post » Fri Aug 28, 2015 1:53 pm

I've uninstalled then reinstalled the updated version 212.2. Still the same.

I feel like there's some setting somewhere somehow that's changed. It's been a week or two since I last worked on the game, and I think it was working fine then.
B
4
S
1
Posts: 9
Reputation: 268

Post » Fri Aug 28, 2015 2:33 pm

What GPU?
When where drivers for GPU updated?

Have you somehow configured the GPU to lock at 30 FPS, e.g. in Nvidia Control Panel, you have an option to set VSync to Adaptive - half refresh rate, which would be 30 FPS for most users.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,544
Reputation: 60,432

Post » Fri Aug 28, 2015 2:56 pm

You are right! Thank you! I figured out what happened now. I have my TV connected to my computer also, but it was disabled in the display settings. Then I wanted to watch something on the TV so I duplicated the display on both the monitor and TV, which forced the TV's settings on Windows, cause I remember I had to change the resolution back when I turned off the TV. It must've also forced the TV's 30 hertz setting on Windows too. It's still kind of weird that when i previewed the game on firefox and chrome, both the "fps" variable and the debugger showed that the fps is 60. I just disabled the TV in the Windows resolution control panel. I didn't change the settings in the NVIDIA control panel, so maybe nw.js was just following the TV's refresh rate, but the browsers weren't. Anyway, thanks a lot.
B
4
S
1
Posts: 9
Reputation: 268


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests