TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why Canvas is not an obvious choice for web games

43 点作者 binomial超过 14 年前

7 条评论

jasonkester超过 14 年前
I'm with this guy. Canvas is great, but it's an element to include in your scene to render vector graphics, not a container for you to render your scene inside. Often you'll have dozens of them layered about the place, happily doing their thing and unaware of each other.<p>Use it right and it's a great tool. Try to use it as a panacea Flash replacement and you're in for a bunch of headache.
评论 #1950335 未加载
评论 #1950050 未加载
voidpointer超过 14 年前
I think he is comparing apples to oranges here. Using HTMl as the "rendering device" works on a different (higher) level of abstraction. The additional layer of abstraction in HTML has already solved the complexity of doing efficient partial redraws based on changes to a subset of a scene graph. This isn't something that the canvas API was meant to handle. If one were to use a scene graph (or display list) abstraction on top of canvas, it would shield the application developer from this complexity just as well as the HTML does now. However, the HTML abstraction, although more general, is implemented in native code while a canvas based scene-graph would need to go through java-script, so it is at a disadvantage as to how far it can be optimized. Basically, what he needs is SVG. :-)
评论 #1950183 未加载
kuahyeow超过 14 年前
This depends on the type of the game, but a fellow developer is beta-testing a canvas based game <a href="http://esdao.com" rel="nofollow">http://esdao.com</a> . It's works quite well, with the exception of Mobile Safari to my recollection which is supposed to perform better with the next iOS update.
评论 #1949793 未加载
jluxenberg超过 14 年前
For anyone wondering what happened to Dextrose (the company Bakaus founded to make the Aves HTML5 game engine), it was bought by Zynga back in May. He is now the CTO of Zynga Germany.
steve19超过 14 年前
WebGL should fix this problem.
评论 #1949853 未加载
bni超过 14 年前
I have found that the performance you get with canvas as opposed to using a DOM based rendering varies greatly with the device and rendering engine that your code runs on (shouldnt be a suprise really).<p>For my game I have encapsulated redering to use webkitTransform and translate3d if hardware acceleration is present. Otherwise use canvas, or in the worst case (IE6-8), use DOM with left and top css attributes.<p>If your game, like mine, can use a form of dirty-rectangle, invalidation strategy to rendering, its possible to do 60fps rendering with low CPU usage on iOS and desktop browsers.
Tyrant505超过 14 年前
So is UO or a good, top down perspective rpg coming to canvas soon? Which have been announced?