[SOLVED] Draw calls can skyrocket when zooming, crashing...

Discussion and feedback on Construct 2

Post » Thu Aug 06, 2015 1:59 am

What is your full screen scaling setting and is the game full screen when this happens? Does it happen in a letterbox integer scale window? I'm imagining that this could be to do with an added GPU burden of having to find detail in previously small sprite images - perhaps the problem is here in how small (shrunk on screen) textures are handled before zooming in...??
A big fan of JavaScript.
B
74
S
20
G
71
Posts: 2,230
Reputation: 44,892

Post » Thu Aug 06, 2015 2:37 am

How are you changing the zoom value?
If you are changing it via some equation, perhaps you should try rounding to the nearest hundredth decimal place.
It might be that the value is getting some strange number that is causing the crash, so you could try rounding it, and also clamping it.
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Thu Aug 06, 2015 6:19 am

@Colludium I've seen most results at high resolutions which may well stress the GPU. I'm not sure I follow about how small textures are handled though. Is there any precedent for this being an issue?
@Prominent I's using an equation, yes. Basically layerscale = layerscale * some_acel_value ^ dt.
I could try rounding it, but that's really weird if it's the case? Again, is there any precedent for something like this?

I really appreciate the suggestions everyone!
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

Post » Thu Aug 06, 2015 6:57 am

Try it without the delta time.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Thu Aug 06, 2015 9:20 am

Just tried both rounding and doing it without dt, still crashed.

Here's a video of the crash in action. Note how long the video goes after frames have stopped showing up!

(Oh, and you might think the white particle has something to do with it but the results are the same with that disabled.)
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

Post » Thu Aug 06, 2015 9:45 am

I can't run the video here, but you might just have to lerp the zoom to pre-set numbers to have it working fine.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Thu Aug 06, 2015 9:59 am

Are you doing a fading effect (layer effect or like lerped opacity) at the same time too perhaps ?
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Thu Aug 06, 2015 10:15 am

I figured it out!

It's the *text*!

Apparently if you zoom in too much when some text is on a zooming layer, the draw calls go absolutely bananas, and the browser will eventually crash! How nobody has run into this issue, I'll never know.
Thankfully I've been able to replicate it in a blank project and I'll be submitting a bug report.

Thanks for the suggestions everyone!

Edit: Here's a link to the bug report.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

Post » Thu Aug 06, 2015 10:45 am

sqiddster wrote:@newt 60, for a smooth zoom. And does 'calling a zoom' have some kind of performance implication that I'm unaware of?


I would have suggested halving that while increasing the scale rate.
Im not sure thats all gpu there, and telling it to scale faster than it can be seen is pointless.
Then it could cause a bottleneck there too.
Image ImageImage
B
169
S
50
G
174
Posts: 8,331
Reputation: 110,806

Post » Thu Aug 06, 2015 12:10 pm

@newt what do you mean? 60fps is 60fps and it will obviously be noticeable if scaling at any lower rate. Anyway that wasn't the cause of the problem.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: technofou and 16 guests