Short update, but a few links that address a few issues that we've run into:
- For Josh's Cup minigame (video soon!), we had some issues with Random numbers not appearing that random. This is partially to do with generating lots of random numbers consecutively (we think its generator uses the system clock as a seed, which means lots of Random numbers end up near each other if you generate them in succession). A helpful blog post details a way to get more widely distributed random numbers, albeit in O(n) time.
- I tried answering an Android question on Stack Overflow on running out of memory in apps with lots of images. My answer was first, but I found the other answers much more instructive, themselves containing great links, and recommend it as reading to anyone wanting to optimize their graphics (which seems to be most readers of this blog, as our highest traffic consistently comes from Josh's excellent post on minimizing transparency losses.
- Finally, while working with Preferences for Rat Race, I hit a really strange bug with ListPreference where I could get a set of options, but when I tried to select them, they would crash the application. The answer was in this excellent blog post, where you learn the dangers of letting your list labels be one type of array, but your list values be another. In Rat Race, I had to make all my numbers Strings and run Integer.parseInt(String) on all my values, but it ran!
- New! Matt mentioned some issues with messaging, and applications that consume resources long after you've killed them. This, unfortunately, is part of the bear that comes with multitasking, and a great post describes how to responsibly exit an app, providing insights on common app-building gotchas along the way.
That last snag was the closest I've come to having stringly-typed data. ^_^
No comments:
Post a Comment