I need your help to figure out Airscape's performance issues

Discussion and feedback on Construct 2

Post » Wed Feb 25, 2015 11:10 pm

Hi everyone!

I'm a little bit at the end of my rope when it comes to performance problems in my game Airscape.

Here's where I'm at currently:

  • On any machine without a decent dedicated GPU, when the game isn't at a tiny resolution, the game runs like trash (This is unclear, but I'll get to it in a moment.)
  • The performance problems are definitely caused by a GPU fillrate bottleneck. If the window size is small enough, it runs perfectly, even on integrated graphics setups.
  • The FPS doesn't actually drop too low (at least in Chrome.) On my integrated graphics tests, the game drops to about 30fps at 1080p resolution. This FPS should be perfectly playable.
  • In Chrome (and subsequently NW.js, my export platform for Steam etc), the game is unplayable at any FPS below 60 when fillrate bottlenecked. This is due to severe jank and input latency.
  • Ah, I mentioned jank! Well, I don't actually think this is directly related to this famous issue, as this seems to be strictly fillrate related, includes input latency, and only effects sub 60fps framerates.
  • I've found that Internet Explorer (?!?!?!?!) handles this issue better than Chrome. This is pretty shocking.
  • Even more shockingly, in my limited testing, disabling webGL only had a relatively small performance impact. I have no idea if this is even related. I might do more testing with this but it's a bit finnicky as there's no way to enable/disable webGL at runtime.

Anyway, nobody wants to hear me whine about the issues I'm having! I'm looking for solutions, and that's where I need your help!

So, first of all, I've submitted a Chromium bug report. It would be fantastic if you could take a few seconds and star this issue so that Chrome will at least have a look at it. I've talked with Ashley about this being a C2 issue but he's assured me that C2 doesn't handle stuff like vsync and input latency.

If you'd like to be a bit more helpful, I'd encourage you to try the stripped-down demo for yourself (especially if you have a weaker machine) and post your thoughts and results here and/or on the Chrome issue. Be sure to mess around with the resolution in esc>options>settings>video.

Also, it's totally possible that I've made some sort of mistake, or that there's something I can do to negate this issue. (I should clarify that I'm not asking how to reduce fillrate by reducing shader use etc, but to get a better performance with a given fillrate.) Anyway, if that's the case, or if you have anything at all you think might be valuable in my case, please do let me know.

Thanks for your time, I really appreciate it.
Daniel
Last edited by sqiddster on Sat Feb 28, 2015 10:31 am, edited 1 time in total.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

Post » Wed Feb 25, 2015 11:42 pm

All I could suggest is starting with the minimal amount of textures you need, and measure from there.
30 seconds to load the demo.
Image ImageImage
B
169
S
50
G
173
Posts: 8,319
Reputation: 110,282

Post » Thu Feb 26, 2015 12:12 am

I have no idea what's going on, but..

Even more shockingly, in my limited testing, disabling webGL only had a relatively small performance impact.


WebGL in itself isn't faster - it's only faster if it's hardware accelerated. If you are rendering WebGL in software it will be awfully slow. So maybe your issue arises from WebGL-contexts that fell back to software rendering for whatever reasons?
B
77
S
28
G
32
Posts: 481
Reputation: 19,763

Post » Thu Feb 26, 2015 12:15 am

@newt it takes ages to load the demo because I left a lot of the game assets in (as it's a total pain to delete every object from the project that's unused in this specific level).

AFAIK fillrate has nothing to do with loading, or image memory, anyway.

@Eisenhans non WebGL is still a fair bit slower, just not as much slower as I expected it to be. I very much doubt that it's fallen back to software rendering, but just to check, is there a way to tell?
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

Post » Thu Feb 26, 2015 12:19 am

Bit of a mixed bag, when the demo loaded I hung around 40-45 FPS for about 30 seconds, before hitting a steady 59, never hitting 60.

When I hit fullscreen, the game instantly hit and stayed at 60, dropping to 57 infrequently.

The real change came when I went into video settings and changed the resolution from 1366x768 to auto, which I assume uses the native resolution (in my case 1920x1080).
After this the game tanked - dropped straight to 30 FPS, then up to 49, 56, 50, before settling at 46. The strange thing is that 46 FPS at the auto resolution is far worse than 46 FPS at 1336x768.

Specs - AMD A8 6600K APU w/ RADEON HD8570D. APUs aren't super common, but it shouldn't be having trouble with a 2D game.

EDIT//
Fullscreen adds a solid 6 FPS to my auto FPS, jumping to 54 - it's pretty steady too, and definitely playable.
B
59
S
21
G
10
Posts: 643
Reputation: 10,293

Post » Thu Feb 26, 2015 12:34 am

@elliott well, that's the first time I've heard of fullscreen *adding* to the fps. Usually fullscreen makes it a lot worse for me. Ugh, there's *another* rabbit hole ._.

46fps at auto resolution is way worse than 46fps at 1366x768 - that's what's super weird and frustrating, and must be an issue on Chrome's end. Did you test on any other browsers by any chance?
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

Post » Thu Feb 26, 2015 12:35 am

on my pc:
Intel Core i7-3770k 3.500GHz, 32GB RAM, Geforce GTX 780 it behaves all the same on every possible resolution setup with fullscreen on / off.

Game stays at 59-60 fps when not moving or moving very slowly (pressing arrow keys from time to time) - here it's fine, nice, smooth and all

but if I start moving around (hold arrow keys) game drops down a bit and stays between 56-58 fps and it's not nice to play anymore. Basically it looks like watching a movie from very old and scratched dvd disc. Keeps pausing for a friction of a second every 2 seconds. I did not noticed any input lag or other issues, only these regular janks when fps drops below 59.

Could you provide similar test game but exported with NW.js ? just to compare if it's the same behavior.

EDIT: Tested in chrome 40.0.2214.115m (64-bit) on Windows 8.1 64
ImageImageImageImage
B
157
S
66
G
42
Posts: 2,603
Reputation: 35,343

Post » Thu Feb 26, 2015 12:39 am

I should mention that the auto resolution levelled out after about 15 seconds, and after the initial swap, takes far less time to stop "acting out" (though every time I swap to auto, it does drop to 30 for a moment before going back up).

Currently tested on Chrome - Version 40.0.2214.115 m.

I don't actually have any other browsers on my PC, I'll go grab FF though.
B
59
S
21
G
10
Posts: 643
Reputation: 10,293

Post » Thu Feb 26, 2015 1:06 am

@sqiddster,
My Laptop system: Toshiba Qosmio F60 Intel i7 M620 @ 2.6GHz 4GB Ram, 64Bit OS. I know its a bit old.
Just trying to give a less then top range pc result so you can see how it runs on lower machines..hope it helps.

Firefox V 35.01 FPS: average 19fps at 1920x1080....1366x768 was about 25fps.
Oh...totally different on CHROME Version 40.0.2214.115. With Fullscreen 1366x768 get av. 45-50fps.
Hard to say as it doesn't Stay that way..HOWEVER, i concur..as soon as i am NOT fullscreen FPS drops
a fair bit to the mid 30s.
I viewed it on my 1920x1080 monitor attached to laptop, not on laptop screen. Also the window size setting i used
were from the game size changed in options. so..Chrome seems OK but Firefox runs like a dog (whats new) and quiet
surprised it ran this well on such an OLD system.
Rob
edit: Put game settings graphics to fastest,1366x768, and FS and ran in Chrome average 52-55fps..hmm..pretty good.
Obviously Chrome and your code is optimized well, i would think.
Is this meant for a Ipad/Tablet/Phone as well or PC only?
Last edited by schmutly on Thu Feb 26, 2015 1:37 am, edited 1 time in total.
B
15
S
3
Posts: 19
Reputation: 944

Post » Thu Feb 26, 2015 1:34 am

http://en.wikipedia.org/wiki/Fillrate
@Ashley
The part about overdrawing is interesting.
Ever think about some sort of occlusion render optimisation?
Image ImageImage
B
169
S
50
G
173
Posts: 8,319
Reputation: 110,282

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests