I love vectors so i started to test the SVG performance.
Using the
Bounding box updates performance test
but with real deal testing, since i belive that pure raw cpu utilization is quite useless for a game. Then i added 3 things:
- 8 movement behaviour
- solid walls to hit
- and bound to layout
The results in 2 phases:
First, raw draw Sprites
12815 objects
raw draw svg
5529 objects
The result is a litle bit obvious, sprites double svg in screen quantity. but now i cap the sprites to a same amount of elements and added movement
using the keyboard i move everything to the top so they collide. And there is an intresting performance test, with the sprites we get 60fps in stand,18-24 in movement and 10-14 fps on collision with the walls.
in svg we have 35 fps in stand, 22-23 in movement and a weird spread from 8-20 in collision, having issues when drops the 10fps barrier, as you can see they jump the wall :P
im pretty sure that with time this will be fixed and better. For now i just hope for the momment when we can edit the xml data in runtime to create animations (like rotating objects or editing the xml variables like the color of the vector elements)
the proyect for testing drive.google.com/open