performance loss r84 -> r95 (r98 too) in canvas2d

Discussion and feedback on Construct 2

Post » Sun Jul 15, 2012 2:55 am

hi, working on a small game:

started out on r84 stable release (dont want to risk stability if a game doesnt need a new feature /commercial approach)

this week i exported with r95 (and r98) because of some improvements
and the performance in canvas2d went down in firefox for about 33%
and opera 50%. im using fairly new browser versions and it happens on 2
different pcs. chrome doesnt seem to be affected (or the framerate is too high to recognise it because the fps were locked at 60)

dont know if this is a bug or has to do with some perfomance enhancements which are mentioned in the changelogs.
sidenote: dont want to focus on webgl because after testing it and research of current support in browsers and hardware i cant use it or even recommend it(imo) to reach more users.

any experiences from other construct2 devs ?

@Ashley do you know about this or any solutions ?
B
4
S
1
G
4
Posts: 36
Reputation: 1,649

Post » Sun Jul 15, 2012 12:52 pm

That's odd, can you share a .capx which is slower now? We improved the performance of our own benchmarks so it's strange it would be slower in other cases.

You should definitely make sure WebGL is enabled - it's about twice as fast as the canvas2d renderer, and if the user's computer doesn't support WebGL it just silently falls back to canvas2d so they can always play.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Mon Jul 16, 2012 2:33 am

tried to recreate the scenario ->

opened jump and run example 9.
set text to fps.
set fullscreen mode off.
webgl is disabled in browsers.

r84 faster than r95
firefox 11: -16%    
opera 11.62: -53%
the other results were in firefox 8 and opera 10 or 11 yesterday.

this time tested on a 3rd pc just to be sure.
so it could be something with canvas2d in windowed mode -
in chrome this doesnt seem to exist, in safari i remember small fps
decrease too(havent tested in safari that much)
the difference in opera is really high, in firefox its not that high but
firefox canvas2d performance is generally the worst thats why every fps is important in firefox. (tested all on lower to up middleclass hardware -
crysis1 10-40fps in medium 800x... 1280x... res,doom3 40-80fps mid to high, diablo3 15-100fps low-mid)

B
4
S
1
G
4
Posts: 36
Reputation: 1,649

Post » Fri Aug 24, 2012 4:37 am

first, congratulations on r100 !

installed r100 to test if anything has changed in performance in canvas 2d. after seeing it has the same fps as r95 i got the idea to test which version broke the high fps count in canvas2d. tried r95,r90,r86,r85 and r84.

result: the change from r84 to r85 is where the fps got a serious hit
for me on several pcs. most noticeable in opera (half fps count).

i recognise c2 was overall more focused on webgl and cutting edge html5 technology lately. personally i would like to see a little shift more to stability and performance (eg canvas2d) as i dont see the consumer numbers in webgl. of course thats arguable and maybe preference at which point most people have good enough hard and software.

besides that, the same applies to the .exe exporter. imo it would be nice if the exe exporter runs on more hard and software combinations, maybe even including the option to use canvas2d if better webgl support is technically not possible or too much work.
also i recommend some minimum requirements page, where it list the minimum requirements for html5, canvas2d, webgl, audio, browser versions, exe export, mobiles and os versions... .
so that devs can expect which oldest configurations has been tested and are supported! now and in future. something like the minimum requirements on pc box sales.

any opinions welcomed





B
4
S
1
G
4
Posts: 36
Reputation: 1,649

Post » Fri Aug 24, 2012 9:39 am

@makedit - if you are trying to maximise performance, you should enable WebGL. It's over twice as fast in Chrome and Firefox. Why have you disabled it?

It is very difficult for us to do anything about your performance issue unless you share a .capx which runs fast in r84 and slow in r100. We generally make small performance improvements in updates, so it would be unusual if it is suddenly a lot slower. I can't see anything in the r85 changelog that indicates any serious changes were made regarding performance either, so I wouldn't know where to start without your .capx.

Opera 12 still does not have hardware acceleration on by default nor WebGL support, so it is very difficult to get good framerates with it. If you are interested in optimising for software rendering, try enabling 'Pixel rounding' in project properties and setting 'Sampling' to 'Point', which can help a little. Generally we optimise for Firefox and Chrome since these browsers have high quality hardware acceleration and the largest market share. IE does not support WebGL but still performs relatively well in our benchmarks - far better than Safari and Opera, at least. We are highly focused on making a stable and high performance engine, but a lot of the work depends on the browser makers, and in my opinion Opera and Safari are falling behind other browsers in this regard.Ashley2012-08-24 09:41:06
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Sat Aug 25, 2012 1:47 am

"@makedit - if you are trying to maximise performance, you should enable WebGL. It's over twice as fast in Chrome and Firefox. Why have you disabled it?"

the last several times ive looked upon the webgl support of browsers i read something around 50percent.

http://codeflow.org/entries/2012/apr/25/webgl-statistics-and-the-state-of-webgl-html5/#webgl-on-desktops

no support in ie, bad support in opera and safari. besides that i calculated even if the webgl support should be over 50 in the browsers people still have to meet the driver blacklist which is not really satisfying when ive tried it on several pcs (low to medium hard and software combinations - which i would call normal office pcs nowadays - but which all should run 99percent of desktop d3d and opengl games, and canvas2d too with the right browser)

so while i personaly like the idea of gl in a browser, i have tested alot of canvas2d prototypes and think these can be run at 30fps with medium graphic settings like a few parallax layers and 800x480 upto 1024x600 fairly well. thats why i guess im trading some gfx for more browser consistency.

so why do i switch wegbl off? there are some combinations ive encountered where webgl works, but is considerably slower than canvas2d and makes a game stuttering alot. but when a game is programmed within the limits of canvas2d of course theres no aaa gfx but it has a higher chance of working like it should. and people cannot mess it up when changing their browser settings, their hardware or update their browsers or drivers.

k for the problem i think ive nailed it down doing benchmarks in many browserversions:

Platform 9 (jump-thru).capx from the example folder
switched fullscreen off,
webgl off,
every tick - text to fps,


r84

opera 10.63      77fps
opera 11.50     79fps
opera 11.62     80fps

firefox 8     51fps
firefox 11     51fps
firefox 1401     54-56fps

chrome 13      58-60fps vsync disable didnt work
chrome 20     87-89fps

safari 517     78fps

r85

opera 10.63      37fps
opera 11.50     37fps
opera 11.62     35fps

firefox 8      53fps
firefox 11     53fps
firefox 1401     53-55fps

chrome 13      58-60fps vsync disable didnt work
chrome 20     87-89fps

safari 517     39fps

it seems the change mainly occurred in opera and safari. i cannot test ie9 because i have no win7 installation atm.


makedit2012-08-25 01:55:53
B
4
S
1
G
4
Posts: 36
Reputation: 1,649


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests