Performance question...

Get help using Construct 2

Post » Tue Feb 19, 2013 9:08 pm

I think it's more of a firefox issue. I test it on my brothers pc (he's got firefox and chrome installed)
chrome - 60fps all the time
firefox - 20 - 45 and keeps changing
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Tue Feb 19, 2013 10:59 pm

[QUOTE=jayderyu] yeah. 400 sprites on a desktop based computer does seem low. Do you have any specifications on your computer. Try turning WebGL off if you can. if your on an older laptop your computer might try to software render the effects which will kill performance.[/QUOTE]

When I turn off webgl I generally get higher framerates... chrome gets even smoother (while still saying 55-60 fps) and firefox *claims* to hit 60 fps but it continues to look chunky and stutter, nothing like chrome at all.

My laptop isn't old per se but again it's not top of the line and has an integrated graphics card (i5-2435M 2.4 ghz duo). It's also running it on a much larger desktop monitor which I noticed does affect performance (1650x1050).Phyvo2013-02-19 23:01:28
B
6
S
1
Posts: 40
Reputation: 917

Post » Tue Feb 19, 2013 11:42 pm

I get 60 fps in Chrome but only 30-40 in Firefox too. But I think it's the enemy AI loop that's killing the framerate, not the stars.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Wed Feb 20, 2013 3:32 am

I don't think it's the whole story. When I disable the enemy AI events it runs around 40-45 FPS, indeed better, but obviously not the whole problem. It also doesn't explain to me why canvas2d would run faster (pretty much the opposite of what the manual implies). Maybe I have some runaway effects hanging around...? Hmm...Phyvo2013-02-20 03:33:17
B
6
S
1
Posts: 40
Reputation: 917

Post » Wed Feb 20, 2013 3:38 am

I suggest You to disable all of your events and eneble them one by one to see which one's are causing this framerate drop.

same with effects if you are using any.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Wed Feb 20, 2013 3:48 am

I just did as you said and it's my star field wrapping. I'm currently trying to move blocks of the field at the same time cause I thought it would be easier on the processor... maybe someone has a much better suggestion than the horribly jury-rigged set-up I have? I'd go the "in visible window" route but I'd like a less repetitive starfield than that if possible... since the player will be able to move in any direction at any time it's not like I can just shoot stars at them from the other side of the screen.

Also, my current setup for detecting where stars are is a pretty heavyhanded use of canvastolayer and layertocanvas. If someone has a more reasonable way to compare their positions to the screen/an object in a different layer parallax that'd help too.Phyvo2013-02-20 03:53:18
B
6
S
1
Posts: 40
Reputation: 917

Post » Wed Feb 20, 2013 9:06 pm

Alright, I did end up fixing it. Canvastolayer and layertocanvas are very taxing on system resources evidently and I ended up eschewing them entirely. Runs a million times better with a simple "star.x < viewportleft(starlayer) - offset" type of condition. I shouldn't have tried to be so fancy or worried so much about being super precise with parallaxes.
B
6
S
1
Posts: 40
Reputation: 917

Previous

Return to How do I....?

Who is online

Users browsing this forum: Renfd, supreme676 and 27 guests