Skip to content

Comment on Why Canvas is not an obvious choice for web gamesparent

Comments

Really? Why would you bother with Canvas at all if you were doing anything (non-rotating) sprite-based?

Canvas' main advantage is that it can render vector graphics. Beyond that it's useful for doing image rotation in a cross-platform way and for manipulating bitmaps. If your game doesn't require those things, I can't think of a reason you'd want to use it in favor of something the browser is so natively good at as laying out image-based scenes.

These days, I'm much more inclined to use 3d-accererated CSS Transforms and Transitions first, then fall back on CSS positioning, then finally Canvas/SVG as a last resort for the few things that can't be accomplished by CSS/HTML.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.