4 ms·
When people refer to HTML5 for games (including this post) they usually mean the HTML5 canvas and its associated APIs (canvas/webGL), not using actual HTML elem
by kyle-rb 7y ago
When people refer to HTML5 for games (including this post) they usually mean the HTML5 canvas and its associated APIs (canvas/webGL), not using actual HTML elements to render game graphics.
From what I know, canvas rendering is pretty much the same across different browsers. It's a pretty low level API so there's not as much room for interpretation. In any case, the Acid3 test you're running is focused on the specifics of HTML/CSS layout, and don't think it tests the canvas at all.
I think that canvas has done a good job of taking over the use cases that Flash had, and is very portable these days (basic canvas has 98-99% support[0]).
[0] https://caniuse.com/#feat=canvas https://caniuse.com/#feat=canvas
- jtolmar 7y agoCanvas rendering isn't that consistent, and when it goes weird it's often OS specific instead of merely browser specific. Some things I've run into: - OSX likes to turn random Unicode symbols into emoji (extends past Canvas) - Fractional font sizes on Chrome/Linux get bizarrely stretched out (after a transform that makes the font not a fractional size) - Complex clipping operations freak Chrome out - All the compositing rendering options are broken somewhere or mis-defined to the point that it's weirdly hard to render anything to an alpha channel You also need input APIs to make a game, and the input APIs often have strange inconsistencies in function names, returned objects, or event ordering. Canvas is nice and straightforward if you want a purely sprite-based game with only mouse/keyboard input (but even then you need to jump through hoops if you want pixel art). Anything beyond that is going to need cross-platform debugging.
- Mirioron 7y agoCanvas has also had some really weird performance issues in the past that are browser specific. Chrome once decided that the number of images used was too many in an animation, so it had to decode some of the images in the animation on the fly. This obviously killed all performance. This bug has been fixed, but I'm sure there are many others like it around.