Wednesday, November 11, 2009

It's Not the Size That Counts

One of the concerns that I occasionally run across when working with Android game developers is that Android handsets don't have enough storage space for applications.  Some folks, such as John Biggs over at MobileCrunch, see this as an obstacle to "real" game development.  In his article on the subject, Biggs notes that Myst for iPhone takes up 727 mb, making it too large for any of the existing Android handsets. His conclusion is that the lack of space on Android devices is preventing game developers from bringing "real" games to Android.


"The real culprit behind the lack of Android apps isn't lack of developer adoption or a difficult SDK – it's the ludicrous 256MB limit on app storage for most current Android phones and Android 2.0 itself. The OS also does not support the installation of apps on removable storage like SD cards, further ruining chances for more effusive and expansive titles. "


Actually, Android imposes no size limit on application space; each device maker may choose what kind of storage and how much they want to put in their devices, and there is already a bit of variation across the handsets currently on the market. The current partition space is the result of manufacturer preference, not some characteristic intrinsic to the Android OS.

While it's true that apps can't be installed on the SD card, and that the amount of available application space on existing Android handsets is smaller than some other devices, I think that this argument is based on the assumption that "better" games must take up more space.  I'm here to tell you that there's no strong correlation between game quality, or even game length, and application size.

Level of Detail
If we take a look back at video games over the last thirty years, we can see that, with each new generation, games have required more space than before. Take the Super Mario series. Super Mario Bros. (1985) for the Nintendo Entertainment System shipped on cartridges that could only hold around 40k of data. Super Mario World (1990) for the Super Nintendo shipped on a 512k cart. Super Mario 64 (1996) for the Nintendo 64 ran in 8 mb, and Super Mario Sunshine (2002) for the GameCube came on a single 1.5 gb mini disc.

The reason that this increase in space is necessary is that the target resolution of the host device has increased over time. The original Super Mario Bros. was designed for a 256 x 240 pixel display, while Super Mario Sunshine was designed for 640 x 480, the standard SDTV resolution. This increase in resolution required that art assets also grow in size; extra pixel density isn't useful if you don't actually have content to fill it with.

This is true whether you're talking about 2D or 3D. In a modern 3D game, resolution is a function of texture detail and model complexity. Texture data includes normal maps, height maps, bump maps, reflection maps, and all kinds of other image data that has increased in resolution (or only recently become viable due to increases in storage space) since previous generations. If you are a gamer with a good memory, you might remember Hideo Kojima talking about how Solid Snake's mustache in Metal Gear Solid 4 contains the same number of polygons as an entire enemy character in Metal Gear Solid 3; presumably, the increase in complexity was necessitated by the move to HD televisions.

So there is a correlation between application size and target screen size. Just not one between application size and game quality.

Running the Numbers
To drive this point home, I took a look at the top games on three different digital distribution networks: Microsoft's Xbox Live Arcade, Apple's iTunes Store, and Android Market. Xbox Live Arcade games are written to be run on HD television sets with 1080p resolution. That's 1920 x 1080, or 2,073,600 pixels. iPhone apps and most existing Android apps are written to run at HVGA resolution, which is 320 x 480, or 153,600 individual pixels. So the XBLA games are running at a resolution roughly 13 times greater than that of the iPhone or Android devices like the T-Mobile G1 or myTouch 3G. So, if we assume that all things are equal and that cost of detail increases at a linear rate (neither of which are very true, but bear with me here), we can reasonably expect about a 13x difference in the physical size of the same content on an HD device compared to HVGA device.

Below is a graph comparing the average application size for these three networks. To calculate this average I used the sizes of the top 20 games (as of Nov. 3, 2009) from each network.




The average top Xbox Live Arcade game is 277 mb. Interestingly, paid games on both iTunes Store and Android Market tend to be a little larger than free games, perhaps because the cost of generating art assets requires the developer to sell the app rather than give it away. In any case, the average iPhone game is 21.5 mb, which is about 12.8x times smaller than the XBLA average--pretty dead on with our resolution-based expectation. The average Android game is even smaller--around 1 mb--though as on the iPhone, paid games tend to be larger than free games.

Though the Android games are smaller in aggregate, there certainly are a number of titles at or above the 10 mb mark on Android Market. This is within the same range as the top 20 iPhone games; Myst at 727 mb is clearly an outlier (and, as an aside, it's larger than all but two of the top XBLA games). You can fit a bunch of top-tier iPhone games in a G1, and even more in a myTouch or Droid.

It's interesting that the Android games are so much smaller. The most popular free apps are tiny--the average of the top 20 free games is only around 300k. This might have to do with how popular games are ranked, or the fact that paid apps have been available on Market for a much shorter amount of time than on Apple's platform. Or it might be something else; Labyrinth Lite, which is available on both platforms, is less than half the size on Android compared to its iPhone version. At any rate, even if the Android games were larger, the average user would still be able to fit a bunch of them on their phone.

So, Size Doesn't Matter?
I don't mean to suggest that size has absolutely nothing to do with game content. There are some types of games, like Myst, that are unusually data-heavy. But content quality isn't a function of size; Super Mario World's tiny 512k footprint is evidence of that. And Android should support installing apps to the SD card (though I suspect that some game developers would be uncomfortable with that option). In the mean time, apps are free to stream data over the network or cache resources to the SD card (as the Android Quake port does), though admittedly this isn't as elegant a solution as true SD card support.  Still, it's an easy solution for big games like Myst.

While we're on the topic, 727 mb for Myst is a fairly surprising number. The original version of Myst targeted 640 x 480 displays at 256 colors and filled a single CD-ROM; even assuming that the iPhone version is using 24-bit color versions of the original graphics, the reduced screen resolution of the iPhone combined with advances in CPU speed and image compression technology should make it fairly easy to cram the game into less space than it originally required. After all, they fit Resident Evil 2, a 2-disc CD-ROM game for the Sony Playstation, into a single 64 mb N64 cartridge!

Plus, a game like Myst should be trivial to stream over the network; the spatial layout of each room is known and so room images close to the player's current location can be streamed in the background. Even if the developer elected not to cache those images to the SD card, 16 mb of application heap is a lot of room for 80k images, so it should be easy to stream far enough ahead into runtime memory that the player never experiences a loading pause.

The point I am trying to make is not that the Myst iPhone developers did something wrong, just that there are many ways to implement this sort of game and not all of them come with huge space requirements. I suspect that Myst on iPhone is as large as it is because that was the simplest way to port the game, not because the game itself cannot be made any smaller. And there's value in that--giving developers as many options as possible to make applications is the number #1 reason that Android should support installation of apps to the SD card. But the claim that this sort of game is impossible on Android platforms is, I think, wrong.

Wrap Up
Game quality has almost nothing to do with application size. For most games, physical size is most directly linked to the size of the screen and the resolution that the host device is running at. By looking at a selection of popular titles, we can see that on HVGA devices (such as the iPhone, or myTouch 3G) there is a fairly small range within which most games of significant scope reside. Looking at the top iPhone games, that range is well within the capabilities of existing Android devices. And while there are exceptions, they are few and far between; the existence of outliers, especially those that are large because of implementation decisions rather than necessity, is not sufficient to damn an entire platform.

Should Android support installing applications to the SD card? Yeah, sure, that'd be great. Is the lack of that functionality blocking games from working on existing Android devices? Not in the slightest.

And for the record, Replica Island is about 4.8 mb, which is a little heavier than I'd like, but not heavy enough that I'm going to spend time doing something about it. It has over 40 levels.

7 comments:

  1. I think the more likely explanations for lack of games are relative market share and the difficulty in hitting 60 fps (as compared to the iphone). The droid helps both of these problems, but doesn't eliminate either.

    ReplyDelete
  2. Relative market share is probably a big factor, but I don't think that difficulty in hitting 60 fps has much to do with anything. First of all, it's not that hard to hit a playable framerate for many types of games; second, many iPhone games don't run at 60 fps; and third, performance tuning is something that becomes known at the end of a project--I don't think it has much to do with what platforms people choose to support at the beginning of a project.

    Anyway, the point of this article was to call out the assertion that quality games must, for some mysterious reason, take up lots of space.

    ReplyDelete
  3. "Xbox Live Arcade games are written to be run on HD television sets with 1080p resolution. That's 1920 x 1080, or 2,073,600 pixels."

    I believe less than two dozen games are full 1080p, that number less so for XBLA titles. Most of them are 720p.

    Anyways, fantastic article. Thanks for keeping this blog consistently updated.

    ReplyDelete
  4. Ok, I'm not entirely sure I buy this logic.

    While I agree that there isn't a link between size and quality, I do believe that there is a connection between free memory and willingness to download apps. A lower willingness to download apps then subsequently impacts the purchase rate of apps, and that subsequently affects the number of apps released for a platform.

    For instance, as an owner of a G1, I know that my willingness to download and purchase games has been SIGNIFICANTLY impacted by my lack of space.

    I can barely fit ANYTHING on my phone. And I don't like the idea of deleting things I purchased to make space for new stuff to purchase.

    Even if the games are <5MB, that's still only a tiny handful of games that I can hold. And at this point I've stopped buying apps entirely because every app I have on my phone is a purchased one or absolutely critical, and I can't bring myself to delete one to try something new. (I had to delete my purchased game of Tetris to make space for Replica Island FYI, and I only did this because I heard that it was open source) I literally am at the brink where if I even download the smallest of apps, I get the memory nearly full warning and my phone slows to an even more painful crawl.

    Ok, that said, I'm an AVID purchaser of this sort of thing. I own over 70 Xbox Live arcade games... but I've only bought like 5 games on Android... why? Because I can't fit anymore.

    So now I don't buy, which means that developers won't see my money, which means that when they see that Android stuff doesn't sell well, more developers won't be attracted to the platform.

    Multiply someone like me by a couple of hundred thousand, and then say that "Space doesn't matter."

    Additionally, I don't think developers would have a problem with WHERE the apps are stored if they are protected by some solid DRM (again see Microsoft's XBLA as a PHENOMENAL implementation of this).

    Anyhow, Space matters for me, and I'm dying for google to allow me to install apps to the SD-card... even if it ends up on my HTC EVO since I want to drop kick this 1.6 android running G1 across the room.

    ReplyDelete
  5. Yeah, this is an old post but still worthwhile to commment.

    As an android developer, what the heck are you talking about? It is inherently easier to develop WITHOUT resource limitations. For example, without space limitations, if you need music, you just tack on an MP3 and tell android to play the file. The code is exactly TWO lines long. With a space limitation, you have to look at alternatives such as downloading files to the SD card, playing MIDI files, etc. Complexity, complexity, complexity. That's a disincentive to develop.

    BTW, streaming data over the network is a bad idea given Android's security model. Depending on the app, that makes the app look like spyware to the average user. The reason is because the app has to request network permissions. (So, for example, why would a supposedly uber-simple game need network permissions?)

    ReplyDelete
  6. I'd say the situation is a bit different now that it was a year ago when I wrote this, but my argument was just that the idea that good games must be large, or that size limitations are the reason there aren't as many games on Android, is bullshit. Yes, having no limitations is much easier than having limitations; I noted that the developers of Myst probably shipped a 700mb game because it was the easiest way to do development, not because there's no way to make that game in less space. But the idea that good games can't be made is crap, and a year later there are plenty of awesome games on Android to prove it.

    Also, Android's security model is excellent for games that need a network connection. An app that requests network access alone is, pretty much by definition, not spyware; to get at information it might want to use about you, or your contact list, or even your phone number, it would have to request other permissions. A game with a request to access the internet is common and shouldn't cause the user concern. A game or app that wants access to the internet AND access to your contact list, for example, might be some thing a user should be wary of.

    ReplyDelete
  7. hello friends how are you ?you can find here replica mobilesreplika telefonlar

    ReplyDelete