Optimal Resolution for Node.js games

Discussion and feedback on Construct 2

Post » Thu Nov 05, 2015 3:11 pm

Recently I've been seeing performance issues with my NW.js game on laptops and other computers without hardware acceleration. Also I've learned about how NW export games load all the layouts into memory and never free any of it (almost like how sound is treated). However, I'm not sure overall memory is my real issue.

My game's resolution is 1920x1080. The performance issues I am seeing aren't terrible, but I fear they will get worse. I believe most of the taxing is draw calls. I have some decent sized background sprites and I've noticed a "lag" like effect when my player goes over them (on these lower tier computers). And when objects are pinned I see them move slightly only to be snapped back into place creating a little wobble effect.

I'm trying to gauge whether changing the game's resolution (drastic I know) would be worth it - whether I do it or not is a completely different story.

Have there been any bench tests done on Node.js games? Any recommendations on what would be the optimal performance resolution for a larger PC game? For example, I made a pixel-art game at a jam once and that game's resolution was 200x150 which of course is up-sized when running. I assume a game at that resolution has a much faster rate of draws creating better visual performance?
B
88
S
29
G
14
Posts: 1,154
Reputation: 15,003

Post » Fri Nov 06, 2015 3:41 am

Running in windowed mode at native or generally very small resolutions overall makes our game run much much better on entry to mid-level/average desktops and laptops, but with fullscreen resolution (even though the base resolution is less than 320x240) there is still major slow-down which is apparently caused by the upscaling/fill rate based on the past conversations regarding the performance issues of Node.JS/Node-WebKit.

An option to force monitor resolution would be really nice, and probably the only hope of improving performance for real (and before someone swoops in to say "optimize your events before blaming the engine!" yes, we have, we have done everything we could to ensure this).
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
113
S
39
G
17
Posts: 2,184
Reputation: 19,217

Post » Fri Nov 06, 2015 3:52 am

Advanced NW.Js games do not work well on integrated GPUs from Intel, like HD4000 or below. Intel's older iGPUs performs quite slow with OpenGL games in my experience, and C2's renderer is OpenGL.

Interesting because a lowly AMD A6 or A8 can accelerate it great.

My current project, Star Nomad 2 lags on Intel HD4000 or below. I don't care since my minimum spec is an AMD or NV GPU.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Fri Nov 06, 2015 12:42 pm

@Silverforce good point, although the average Steam user is running an Intel integrated GPU/weak GPU, so advanced games (which could still be targeted for a casual/fairly wide-reaching game) are unable to reach that large chunk of audience. (source: http://store.steampowered.com/hwsurvey?platform=pc scroll down to see the most common GPU per DirectX version running)

As for AMD, be careful there too as we have found that even computers that, based on their specs you would think they should run the game better than an Intel HD4000 laptop, have had some issues where the older cards (2010-2013 and older, basically stuff before WebGL) despite having way more "power" than an Intel CPU were having equal or more lag playing our game. Haven't seen this happen with NVIDIA yet.
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
113
S
39
G
17
Posts: 2,184
Reputation: 19,217

Post » Fri Nov 06, 2015 1:32 pm

Oh yeah, AMD GPU prior to GCN (6970 and below) is no longer supported in drivers, so they misbehave often.

NV has dropped support for older GPUs, so 460/470/480 and less may have issues.

I guess that's just the nature of GPU hardware, 2 years = old. 3 years = very old and 4 or more years = obsolete.

My point is don't expect to make a complex game with C2 with lots of things happening, shaders going on often and expect it to run well on Intel GPU. It may for Haswell and Skylake (HD5000+) but in my testing, WebGL shader effects wreck performance on HD4000 or below, even in very simple games. Sad state of affair I understand.. so if any C2 dev want to target HD3000/4000, do not use WebGL effects, and also you may actually get heaps better performance with WebGL disabled, running software mode (Intel's CPU is very fast for software mode).

This came up awhile ago, there's WebGL benchmarks and people tested their Intel GPU, it was horrendously bad.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Fri Nov 06, 2015 1:55 pm

jobel wrote:Also I've learned about how NW export games load all the layouts into memory and never free any of it

That's not true, layout-by-layout loading frees images when you change layouts, so it only ever has one layout loaded. See Memory usage.

If you reduce the size of the window size (misleading name: should be viewport size) and use the same size window with letterbox scale, it will make no difference at all: the same rendering work is done. What does make a difference is reducing the window size and turning on "low quality" fullscreen mode. That renders the entire game smaller, then stretches the final result to the display size. It's almost the same as actually switching the monitor resolution (which would just do the final stretch on the monitor display chip, but GPUs are really fast at stretching things).

Intel graphics chips suck. They share system memory so have really constrained bandwidth and very low fillrate limits. You have to design games very carefully to work well on them. The good news is many laptops with Intel chips are really dual-GPU and have a powerful AMD or nVidia card as well. If you can make sure everyone switches your game to the powerful GPU, all your performance issues should be resolved!
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,454

Post » Fri Nov 06, 2015 3:15 pm

I agree with @silverforce. It seems like technology has evolved only to complicate game play/export options. It's not ideal to have to tell customers that their 2 year old laptop is not supported by your nw.js game in full screen, so they better go back to playing GTA on it instead, lol....
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,193

Post » Fri Nov 06, 2015 4:08 pm

Jayjay wrote:... but with fullscreen resolution (even though the base resolution is less than 320x240) there is still major slow-down which is apparently caused by the upscaling/fill rate based on the past conversations regarding the performance issues of Node.JS/Node-WebKit


Is this with turning on "low quality" in Project Properties?
B
88
S
29
G
14
Posts: 1,154
Reputation: 15,003

Post » Fri Nov 06, 2015 4:45 pm

Ashley wrote:That's not true, layout-by-layout loading frees images when you change layouts, so it only ever has one layout loaded.


I have observed when playing (the NW.js export) there are 3 processes (2 of them are background processes) that end up growing as the game is being played. So far in my game it seems to cap out at around 600MB (total). I was under the impression the reason for this is that NW caches objects in memory to allow them to be loaded without any jank and that it caches each Layout as they are loaded. I'm well aware of C2's Layout memory management, I just figured it was something negated by NW.js, but if you are saying that is not the case, then that's great news. Although it still does not explain this memory usage.
B
88
S
29
G
14
Posts: 1,154
Reputation: 15,003

Post » Fri Nov 06, 2015 4:49 pm

Ashley wrote: If you can make sure everyone switches your game to the powerful GPU, all your performance issues should be resolved!


sorry if this is a dumb question, but can you explain this "switching"? Are you saying users have control over how their systems run a NW.js game? This reminds me of how in Blender you can set the render to CPU or GPU, the latter giving you a huge boost to render times.
Last edited by jobel on Fri Nov 06, 2015 5:27 pm, edited 1 time in total.
B
88
S
29
G
14
Posts: 1,154
Reputation: 15,003

Next

Return to Construct 2 General

Who is online

Users browsing this forum: NadeemAbbass and 5 guests