canvas2d vs webgl

Discussion and feedback on Construct 2

Post » Fri Oct 17, 2014 10:00 pm

Hi all, I hope you can help..

@Ashley in a blog several years ago posted a detailed discussion of canvas2d vs webgl, claiming webgl was fast and on chrome, much faster than canvas2d. He presented two test cases (links below) which he said would allow for this to be tested.

https://www.scirra.com/blog/58/html5-2d ... e-analysis
https://www.scirra.com/labs/perftest-2d
https://www.scirra.com/labs/perftest-webgl

now out of curiosity I ran these again as I was curious about IE11 performance. I also tested it on chrome 37, firefox .
I am using a laptop which has in-built intel graphics so nothing special. what I got for the two tests were

IE11: 30 FPS @ 8471 for canvas2D, and 2971 for webgl
CHROME: 30 FPS @ 1351 for canvas2D, and 3150 for webgl
FIREFOX: 30 FPS @ 13385 for canvas2D, and 3140 for webgl

so I know that there are many many things that could be skewing the results, but which is best to use for performance... assuming that you are not using any fancy webgl effects?

R
B
7
S
3
G
1
Posts: 184
Reputation: 1,352

Post » Sat Oct 18, 2014 12:37 pm

Those are ancient performance tests, we've made loads of engine optimisations since then. Try this one:

https://www.scirra.com/demos/c2/renderperfgl/
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,464

Post » Sat Oct 18, 2014 4:56 pm

Done the test, 6774 objects for 30 fps on webGL on my tablet
388 objects at max without it, for an instable around 24 fps on the same tablet

Both tests on chrome for android.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Sat Oct 18, 2014 6:38 pm

thanks @Ashley, @Aphrodite,

so I accept that webgl runs faster than it used.. I got around 6K objects for 30 fps on my laptop..
but I thought canvas2d and webgl performance was also strongly dependent on browser performance as well... so I was wondering whether that aspect has changed.

definitely not using webgl is a bad thing if you are using the chrome engine, so android apps definitely must use webgl. I was wondering about other use cases.
B
7
S
3
G
1
Posts: 184
Reputation: 1,352


Return to Construct 2 General

Who is online

Users browsing this forum: R0J0hound and 3 guests