What are advantages and disadvantages of creating games in 'pure' DOM as compared to using canvas?
In short, the canvas and WebGL are more performant than the DOM, and with third-party libraries, its ease-of-use is comparable; furthermore, growing browser support for additional web standards have the potential to further boost canvas performance.
canvas pros :
cons:
DOM pros:
cons:
When you develop with Canvas you will have to use the GameLoop technique which is very painful because you will have to redraw all elements all the time.
When you develop with DOM you will be able to redraw only the objects that have been modified and will leave the hard work for the browser implementation.
If your game has a few modifications per frame then you can use the DOM, otherwise use the Canvas, please! It is so much faster!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With