Tuesday, September 10, 2013

bugs bugs bugs

Finally...

Discovered a pretty strange iPad3 bug late last night. Caused the app to crash when the player tried to enter the campaign.

Strangest thing, was working fine the day before. (sigh)

Spent all morning trying to tackle the problem. The root cause was understandable. For some unknown reason there was a massive spike in graphics memory (50mb to nearly 150mb)  when a player entered the campaign. This spike would cause the iPad to basically faint at the sight of it.

But what was the underlying problem?

Well, it all comes down to what assets are being drawn on the screen. We have a single asset for the cell shape, which is prominently displayed on the main screen.

This asset was then scaled down to be re-used in two places. As the level images & the sub-level images. In general re-using assets is a very good thing. The thing is that because these assets are so large (778x778) & there were so many of them created. 6 of the 12 levels have 5 sub-levels within them so in total 36 of these cells.

The thing is that even though they are scaled down they still take up the same amount of graphics memory as the full-sized version.

This result was tripling our graphics memory.

To fix the problem I created 2 new variants of cell asset. A small one, used for sub-levels and a medium used for normal levels.

This new method solved the issue, bringing our graphics memory down to 60mb!

-----

In other news Marguerite is in New York today meeting with our publisher.

Testing went well, despite the fact that I did not have access to additional iPad's (kinda hard to test an iPad game with 1 iPad).

We will be testing tomorrow as well (hopefully I'll be able to remedy the iPad situation)

Then Friday we go down!

No comments:

Post a Comment