Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pros and Cons of using SVG for Android Games [closed]

I plan to start a game in Android but I am not sure whether I should use SVG's or PNG's for the graphics. I know that SVG's advantage is its, correct me if I'm wrong, scalability. But aside from that? Are there any others? On performance, or speed, or etc.

And by the way, the game may involve physics computations, and the screen would really update alot. Would that be a problem?

I'll be using Java for this, not HTML5.

like image 834
jarenz Avatar asked Jun 05 '12 02:06

jarenz


1 Answers

Yeah, I thought that using implicitly scalable resources like SVG and vector-based fonts would make a lot of sense on Android where there is such a diversity of displays. But that doesn't seem to be the case.

In practice all the Android tools and examples use scaled bitmaps, not natively scalable abstractions like SVG. The android infrastructure has support for computing the density and size of the display and using that to look up size-appropriate bitmaps for a device (see Dealing with Screen Sizes). Most other game libraries (like libGDX) are similarly oriented around bitmaps.

(Perhaps a big reason for this is that the underlying hardware is also optimized for copying bitmaps around, too.)

I suggest sticking with the technology that everyone else is using and that the tools and tutorials are oriented around, unless you're explicitly interested in exploring some new ground. Even then, having a strong background in how its "normally" done, would probably be required to actually evaluate any new approach.

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

like image 170
P.T. Avatar answered Sep 23 '22 12:09

P.T.