2 ms·
Canvas mostly works across browsers but there are still variances and browser-specific edge cases you have to detect. Cross-browser audio is an absolute trainwr
by kevingadd 15y ago
Canvas mostly works across browsers but there are still variances and browser-specific edge cases you have to detect. Cross-browser audio is an absolute trainwreck, and APIs like gamepad, fullscreen, etc. are all very finicky as well and will require careful effort if you want to use them in each browser. Plus, each JavaScript runtime has things it likes/doesn't like so to get playable performance for a serious game in all the browsers you'll have to spend a while figuring out how to tune your JS for all of them (or writing browser-specific versions). This is made worse by the fact that some of the major browsers don't have usable profiling tools...
But sure, if all you want to do is draw some lines and bitmaps on the screen, no problem.
- sil3ntmac 15y agoAgreed. HTML5 audio is definitely a complete mess, you need shims and fallbacks if you even want to consider using it... but for the present (e.g., on modern browsers+devices), canvas seems to be the winner in terms of write-once, run-anywhere for games and animations that look great and run smooth. And since it is an open standard, we can look for other devices (smart tv's, game consoles, car dashboards... okay perhaps that is dangerous) to support it in the not-so-distant future.
- TazeTSchnitzel 15y agoYou think audio is a trainwreck? You haven't tried detecting key presses.