SVG or Canvas | Sololearn: Learn to code for FREE!


SVG or Canvas

Hi, I am working on online browser game and I have a little problem... In this game will be used many animations and effects. Should i use Canvas for rendering objects or SVG? I read some articles about this problem. SVG is supposedly slow, but I cannot imagine animations in Canvas. Thanks for help.

1/9/2018 10:23:07 PM

Matúš Semančík

7 Answers

New Answer


Definitely. With SVG one character will be ok. 30 would have so much lag that the game would be unplayable.


Do you remember these lessons? I think they will answer your questions.


Yes, I would be looking at objects for this, it will make creation and management much easier. Nice Character!


Thank you for response. This methods can rotate, translate and scale canvas... So I need function, which will calculate positions and rotations of each element (e.g. 30 players, each player has character - head, legs, arms...) and in interval draw these elements? I have prototype using svg ( ). You can look at it.


Thank you so much!


Okay, so definitively canvas?


Use pixi.js. Definitely the best library for canvas drawing.