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čík7 Answers
New AnswerDefinitely. 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. https://www.sololearn.com/learn/HTML/2202/ https://www.sololearn.com/learn/HTML/2203/
Yes, I would be looking at objects for this, it will make creation and management much easier. https://www.sololearn.com/learn/JavaScript/1152/?ref=app 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 ( http://ageofdanrolius.herokuapp.com/character.html ). You can look at it.
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message