Skip to main content
replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/
Source Link

That's completely game-specific, actually.

If your game is in some very simple/discrete space, then moving divs around will do.

But if you really want to do more complex graphics without much coding, go with the standard for HTML5 games - the canvas element. Do note that many HTML5 game engines support DOM rendering, but I'm not sure to what extent, I doubt that you'll have that awesome canvas API at your disposal.

As for engines, refer to this answer: http://gamedev.stackexchange.com/a/32777/9736https://gamedev.stackexchange.com/a/32777/9736.

The only other comparison I can make between the canvas and the DOM is that the DOM is a bit faster, or so I hear. But really, nothing substantial.

That's completely game-specific, actually.

If your game is in some very simple/discrete space, then moving divs around will do.

But if you really want to do more complex graphics without much coding, go with the standard for HTML5 games - the canvas element. Do note that many HTML5 game engines support DOM rendering, but I'm not sure to what extent, I doubt that you'll have that awesome canvas API at your disposal.

As for engines, refer to this answer: http://gamedev.stackexchange.com/a/32777/9736.

The only other comparison I can make between the canvas and the DOM is that the DOM is a bit faster, or so I hear. But really, nothing substantial.

That's completely game-specific, actually.

If your game is in some very simple/discrete space, then moving divs around will do.

But if you really want to do more complex graphics without much coding, go with the standard for HTML5 games - the canvas element. Do note that many HTML5 game engines support DOM rendering, but I'm not sure to what extent, I doubt that you'll have that awesome canvas API at your disposal.

As for engines, refer to this answer: https://gamedev.stackexchange.com/a/32777/9736.

The only other comparison I can make between the canvas and the DOM is that the DOM is a bit faster, or so I hear. But really, nothing substantial.

Source Link
jcora
  • 7.9k
  • 4
  • 53
  • 88

That's completely game-specific, actually.

If your game is in some very simple/discrete space, then moving divs around will do.

But if you really want to do more complex graphics without much coding, go with the standard for HTML5 games - the canvas element. Do note that many HTML5 game engines support DOM rendering, but I'm not sure to what extent, I doubt that you'll have that awesome canvas API at your disposal.

As for engines, refer to this answer: http://gamedev.stackexchange.com/a/32777/9736.

The only other comparison I can make between the canvas and the DOM is that the DOM is a bit faster, or so I hear. But really, nothing substantial.