+ 3

why we cant use svg in gamings?

29th Jul 2016, 2:22 PM
Mahantesh AT
Mahantesh AT - avatar
4 Réponses
+ 5
SVG files are of vector type, and as such, heavier and not suitable for games. On canvas, you have raster images, which are lighter and make games run faster.
29th Jul 2016, 10:45 PM
ZinC
ZinC - avatar
+ 2
@ Richard, there're JavaScript libraries that do the hard work.. But simply put, they use functions and methods that create frames like in a movie by setting interval to do the following many times per second: drawing a shape, clearing the canvas, drawing it again 1px to a direction (right/left/up/down), updating the canvas, changing colors.. and thus creating an animation..
30th Jul 2016, 12:03 AM
ZinC
ZinC - avatar
+ 1
Sorry for this dumb question zinc but how can we use canvas for making games since they don't have built in animation property
29th Jul 2016, 11:30 PM
Ozii
Ozii - avatar
+ 1
Ooo ok thanks a lot, you are awesome 🙆
30th Jul 2016, 12:07 AM
Ozii
Ozii - avatar