Pros and cons of using SVG for Android games

I plan to start the game on Android, but I'm not sure if I should use SVG or PNG for graphics. I know that the advantage of SVG is, correct me, if I'm wrong, scalability . But other than that? Are there any others? By performance, speed, etc.

And by the way, the game may include physics calculations, and the screen will indeed be greatly updated. Would this be a problem?

I will use Java for this, not HTML5.

+7
source share
1 answer

Yes, I thought that using implicitly scalable resources such as SVG and vector fonts would make a lot of sense on Android, where there is such a variety of displays. But this does not seem to be the case.

In practice, all Android tools and examples use scaled bitmaps rather than natural scalable abstractions such as SVGs. The Android infrastructure supports the calculation of the density and size of the display and uses this to find raster images that match the dimensions for the device (see Working with screen sizes ). Most other game libraries (like libGDX) are similarly oriented around bitmaps.

(Perhaps the biggest reason for this is that the underlying hardware is also optimized for copying bitmaps around.)

I suggest sticking to the technology that everyone else uses, and that the tools and guides are oriented around if you are clearly not interested in learning any new base. Even then, having strong experience in how it was β€œnormally” done, you will probably need to actually evaluate any new approach.

Some answers to this recent question may be useful for you: https://gamedev.stackexchange.com/questions/30111/why-dont-more-games-use-vector-art

+13
source

All Articles