I'm starting to develop an online backgammon game. I 'm not sure whether to use html5 canvas or use dom and css. could you tell me the pros and cons of each approach for moving and animating pieces?
Asked
Active
Viewed 659 times
1 Answers
0
Board games like backgammon require very little animation, and/or fancy animations. In other words, it's a relative "simple" 2d game (relative to what's possible with both DOM manipulation and Canvas 2d context). I assume you want to make it in 2d.
This means that you can use both methods to create the game; they will both do just fine. The real question becomes: which technique do you know more about, and do you prefer? If you don't know the answer to that, start investigating in both techniques. Read simple tutorials, play with some code and get the gist of both techniques. Then make your decision.
Canvas
- pro: more advanced techniques available
- pro: easier to distribute to game portals
- con: a bit harder to master imo
- con: easy to fkcu it up (memory and performance wise)
DOM manipulation
See the canvas pros and cons, and revert them ;)
Here a nice guide to canvas 2d context methods.

Karel de Boer
- 38
- 4