I am using html5 to build a game and it is based on Canvas not webGL. I am trying to build sprites from canvas object not from images. Because there will be many sprites on the screen and each of them has different size and moves to different direction I would be using many canvas objects. I wonder if it's OK to put so many canvas objects on the browser screen. Will this make the game very slow?
Answer
Elements not in tbe DOM don't affect the rendering performance because they aren't used by the DOM renderer. They only take up a bit of memory but until you have couple thousand of them or they each have insane resolutions, then you won't have a problem with this.
No comments:
Post a Comment