HTML5 Canvas Performance

Discussion and feedback on Construct 2

Post » Sat Sep 17, 2011 6:57 pm

Right, and I am just going to wait until it gets to the point that even a crappy old intel chip can get a playable fps, that's all.
B
13
S
6
G
6
Posts: 144
Reputation: 3,106

Post » Sun Sep 18, 2011 3:37 pm

The topic wasn't meant to say anything about or against C2. Its whole purpose was to see if I could get help here for a more general problem. I still doubt that Firefox really is using the hardware to accelerate the canvas.
I can see this in little issues. For example, FishIE Tank is nothing more than a background with lots of fish spritrs running fullscreen. How come that the framerate jumps to certain values back and forth? I mean, there are no in between steps, it starts at ca. 32 fps, after a second it instantly jumps up to 60, half a second later it falls back to 32, a second later it falls down to 15, and then that whole loop repeats again and again.

[QUOTE=zenox98] Out of interest, what's the lowest FPS for the Space Blaster game? At times, it drops to around 11 or 12 FPS when screen is busy for me.[/QUOTE] Where can I see the framerate in the online demo?

[QUOTE=PixelRebirth] HTML5 will run fast in every major browser pretty soon. Of course the hardware and OS combination probably won't be allowed to be too outdated. I'm actually more worried about mobile performance. That should improve too once the technology gets more popular.

From my second little HTML5 performance test one could roughly talk about an average 44,2% improvement regarding the five biggest browsers in the last 6 months. If this keeps going, we are on a good path. [/QUOTE] And now it becomes even more mysterious: I followed your link and tried the sun-demo (Nice blog, btw!). According to your explanations and comparing my system with your system, that demo would need to run significantly slower for me than you experienced. May PC is just an older Athlon II with 3 GHz, the gfx card just a NVIDIA 9400 GS. But guess what? I had 46 fps instead of your 32 fps. Significantly higher.

I mean, all I want is having a simple backdrop with 50 sprites in fullscreen running at 60 fps. With DirectX I can manage to do this with more than 1000 fps, so I don't think it is overcharging (and btw, Minecraft is javascript, too. It runs with solid 130 fps in FullHD-Fullscreen). I just don't know, where to start looking for the causes. Is it javascript? Is it Win XP? I know C2s demo is by far the slowest, but on the other hand I experience issues with demos too, that weren't created with C2 (although less processing hungry). So it isn't C2. It might be that a problem with javascript will be somehow enhanced through C2, which would be a good thing, as it would serve as an indicator to the robustness of the underlying javascript language.

So, it seems, there is no solution to this obvious problem I'm experiencing? tulamide2011-09-18 15:39:19
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sun Sep 18, 2011 3:45 pm

DirectX uses specific functions of the gpu.
Also minecraft is java if I'm not mistaken, not javascript.

It seems that using windows7 and chrome or IE provides the better performance with html5 games.

I'm using firefox on XP, and games aren't THAT fluid on it, but it's fine by me. (c2 runtimes seems to run better than HTML5 demos though)
Browsers will keep on evolving. Firefox has promised about a 40% improvement of its performance by march 2012 (even sooner). The browsers war still emulates improvement on their part.

So apart from changing your OS/gear, I'm not sure there's more to do but use chrome (best overall performances apparently) and wait for the browsers next updates.

It it a matter of time.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Sun Sep 18, 2011 4:03 pm

[QUOTE=Kyatric]Also minecraft is java if I'm not mistaken, not javascript.[/QUOTE]
Kyatric is right, Minecraft is written in Java not Javascript. Java is more comparable to C++ as a language, and almost as fast, so you can't really compare Java's performance to Javascript.

Performance is a complicated thing. Whether or not hardware acceleration is enabled depends on a number of factors, including the browser version, the OS, your actual hardware, your driver version, and so on. Hardware acceleration is never guaranteed to be enabled - Firefox 6 doesn't like my old GeForce Go 7600, so disabled hardware acceleration even with the latest drivers. However, IE9 (of course, not available on XP...) doesn't mind and still used hardware acceleration. Worse, it's often hard to tell, since FPS rates vary and browsers have a number of places hardware acceleration can be used, e.g. in rendering ordinary HTML documents, but not covering the canvas element itself!

To further complicate it, different browsers, systems and hardware have different performance characteristics - regardless of whether hardware acceleration is enabled, different systems can still get very different framerates, because they're good at different things. And by "system" I mean the entire system from your physical graphics card right the way up to the browser software version.

TL;DR - when it comes to performance don't expect anything. Maybe try some different browsers and stick to whatever works best for you.Ashley2011-09-18 16:05:28
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Mon Sep 19, 2011 8:31 pm

I get 0-4 fps on ghost shooter.
Using latest versions of Firefox and Chrome
B
18
S
4
G
1
Posts: 413
Reputation: 2,512

Post » Mon Sep 19, 2011 9:41 pm

[QUOTE=Kyatric] DirectX uses specific functions of the gpu.[/QUOTE]
Of course it does. That's what "hardware accelerated" means ;)


[QUOTE=Kyatric]Also minecraft is java if I'm not mistaken, not javascript.[/QUOTE]
My bad. I mixed it up. Sorry about that.


Well, if it turns out that browsers in general don't reach stable 60 fps yet, it kind of relieves me. I really thought it is just an issue with my pc again.
I don't see why I should buy some expensive hi-end graphic card just to be able to see 60 fps in low resolution canvas-games, when my current equipment is fully capable of doing it. I mean, it even runs flash games with highest demands and sizes solely based on the cpu with stable 30 fps. I expect at least the same power from HTML5.

So I will wait just a little longer. (I don't like google, that's why I won't install chrome, I'll stick to firefox)tulamide2011-09-19 21:41:58
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Mon Sep 19, 2011 10:06 pm

It's still fairly early days for HTML5 - hopefully if you wait a few months, support will improve and everyone will have great framerates.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Tue Sep 20, 2011 6:18 am

[QUOTE=Kyatric] Firefox has promised about a 40% improvement of its performance by march 2012 (even sooner). The browsers war still emulates improvement on their part.[/QUOTE]

Yup, i've been using Opera for about a decade, but was recently forced to switch to FF nightly (UX-9) for this very reason. That '40% improvement' looks like a conservative estimate based on the JS/canvas demo i ran my cross-browser comparison on. I test and develop on crap hardware for the benefit of end users, but that doesn't mean i should not to run best software available for free. At least that way, if a user says "oh, i can't afford the latest hardware" then a simple link to a nightly build and a friendly ;O) should do it.
B
6
S
1
G
2
Posts: 32
Reputation: 1,347

Post » Tue Sep 20, 2011 2:39 pm

PixelRebirth measured a ~40% performance increase across all major browsers, just in the last 6 months! I'm sure more performance increases are likely.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Tue Nov 08, 2011 4:35 am

It's been a few weeks. Today I got a new graphics card, a MSI N460GTX Hawk. It's a up-to-date, powerful and supported card. And of course I installed the newest driver (285.58)
To my astonishment Firefox still doesn't care! Under the same testing conditions I still get the same framerates as with the older 9400GS (yes, 8 fps with ghost shooter, 25-32 fps with fishieTank, etc.)

Does anyone also use that model (MSI N460GTX Hawk, 1GB, Talon Version) and Firefox 7.0.1? If so, I'd like to know if you also have that disappointing performance?
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests