<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2820553293105918062</id><updated>2012-01-27T22:05:09.096-08:00</updated><category term='video'/><category term='people'/><category term='platformer'/><category term='demo'/><category term='ratrace'/><category term='brown'/><title type='text'>Brown CS:  Android Attack!</title><subtitle type='html'>Documentation on the findings and adventures of Lyla Fujiwara, Matt Wilde, Josh Kaplan, and Paul Meier, four Brown University students studying mobile game development in an independent study.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>paul</name><uri>http://www.blogger.com/profile/08385585864019040360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/Sv85rYG9TBI/AAAAAAAAAAM/zkcLrmtmn3A/S220/6171_596993662761_1010423_34527747_2986305_n.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-9016243447968489507</id><published>2010-05-21T10:29:00.000-07:00</published><updated>2010-05-21T10:41:43.776-07:00</updated><title type='text'>Tap-A-Mole is on the Android Market!</title><content type='html'>Tap-A-Mole is a standalone version of the Whack a Mole minigame I made for our failed Adventure game attempt. It features three difficulty settings, score keeping, and the Benny Hill theme. Try it out and tell us what you think!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_QEErj7lqsuY/S_bDe8tH8rI/AAAAAAAAAFk/xLX9a6O3t0A/s1600/introscreen.png"&gt;&lt;img style="display:inline; margin:10px; text-align:center;cursor:pointer; cursor:hand;width: 180px; height: 320px; float:left;" src="http://3.bp.blogspot.com/_QEErj7lqsuY/S_bDe8tH8rI/AAAAAAAAAFk/xLX9a6O3t0A/s320/introscreen.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5473777333574300338" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_QEErj7lqsuY/S_bD5AS3QLI/AAAAAAAAAFs/bKpOoLBKu0Q/s1600/ingame.png"&gt;&lt;img style="display:inline; margin:10px; text-align:center;cursor:pointer; cursor:hand;width: 180px; height: 320px; float:left;" src="http://4.bp.blogspot.com/_QEErj7lqsuY/S_bD5AS3QLI/AAAAAAAAAFs/bKpOoLBKu0Q/s320/ingame.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5473777781214494898" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-9016243447968489507?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/9016243447968489507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/05/tap-mole-is-on-android-market.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/9016243447968489507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/9016243447968489507'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/05/tap-mole-is-on-android-market.html' title='Tap-A-Mole is on the Android Market!'/><author><name>Wilde</name><uri>http://www.blogger.com/profile/12310009426208325477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/S3tth4djdII/AAAAAAAAABM/gQwNJ_NuqlQ/s320/matt.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_QEErj7lqsuY/S_bDe8tH8rI/AAAAAAAAAFk/xLX9a6O3t0A/s72-c/introscreen.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-5043760735903249325</id><published>2010-05-20T08:15:00.001-07:00</published><updated>2010-05-20T08:18:01.669-07:00</updated><title type='text'>For the next patch of Momenta, we look to the 90's</title><content type='html'>It's been decided that for the next patch of Momenta, we will tighten up the graphics on Level 3.&lt;br /&gt;&lt;br /&gt;&lt;div style="width: 400px; margin: 10px auto;"&gt;&lt;br /&gt;&lt;object width="400" height="322"&gt;&lt;param name="movie" value="http://www.youtube.com/v/t9840coJ3C8&amp;hl=en_US&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/t9840coJ3C8&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="322"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-5043760735903249325?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/5043760735903249325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/05/for-next-patch-of-momenta-we-look-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/5043760735903249325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/5043760735903249325'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/05/for-next-patch-of-momenta-we-look-to.html' title='For the next patch of Momenta, we look to the 90&apos;s'/><author><name>paul</name><uri>http://www.blogger.com/profile/08385585864019040360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/Sv85rYG9TBI/AAAAAAAAAAM/zkcLrmtmn3A/S220/6171_596993662761_1010423_34527747_2986305_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-7447305393923156498</id><published>2010-05-15T21:02:00.001-07:00</published><updated>2010-05-15T21:12:56.181-07:00</updated><title type='text'>Our centerpiece game is on Market!</title><content type='html'>We're happy and proud to release Momenta (development title &lt;a href="http://brownandroidattack.blogspot.com/2010/04/game-updates.html"&gt;Platformer&lt;/a&gt;) to the Market today!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_3ys1dwfzc2w/S-9wdExfumI/AAAAAAAAAFg/MM-SJRbz-i4/s1600/screen1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_3ys1dwfzc2w/S-9wdExfumI/AAAAAAAAAFg/MM-SJRbz-i4/s320/screen1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5471715717078301282" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As with &lt;a href="http://brownandroidattack.blogspot.com/2010/05/our-first-game-is-on-android-market.html"&gt;our last Market release&lt;/a&gt;, you can &lt;a href="http://market.android.com/details?id=androidattack.platformer"&gt;click here&lt;/a&gt; if you're browsing from an Android phone, or search "Momenta" in the Android Market.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_3ys1dwfzc2w/S-9wdUGqzAI/AAAAAAAAAFo/b7lT_HISTxc/s1600/screen2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_3ys1dwfzc2w/S-9wdUGqzAI/AAAAAAAAAFo/b7lT_HISTxc/s320/screen2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5471715721193638914" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What would you pay for this &lt;a href="http://en.wikipedia.org/wiki/Eyjafjallajökull"&gt;Eyjafjallaj&amp;#246;kull&lt;/a&gt; eruption of fun?  You might say $10,000, but wait, it's free!  Download it, PLAY IT, enjoy it, and please provide feedback!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-7447305393923156498?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/7447305393923156498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/05/our-centerpiece-game-is-on-market.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/7447305393923156498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/7447305393923156498'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/05/our-centerpiece-game-is-on-market.html' title='Our centerpiece game is on Market!'/><author><name>paul</name><uri>http://www.blogger.com/profile/08385585864019040360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/Sv85rYG9TBI/AAAAAAAAAAM/zkcLrmtmn3A/S220/6171_596993662761_1010423_34527747_2986305_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3ys1dwfzc2w/S-9wdExfumI/AAAAAAAAAFg/MM-SJRbz-i4/s72-c/screen1.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-2676218250464462380</id><published>2010-05-14T13:03:00.000-07:00</published><updated>2010-05-14T13:04:55.393-07:00</updated><title type='text'>Our first game is on the Android Market!</title><content type='html'>Pick it up!  There isn't a way to link to the market itself (unless you're viewing this on an Android phone, in which case, &lt;a href="http://market.android.com/details?id=cs134.adventure.minigames.ratrace"&gt;click here!&lt;/a&gt;).  If you search 'Rat Race' from your phone, it's the only app that comes up.&lt;br /&gt;&lt;br /&gt;It's free!  Download it, upvote it, PLAY IT, enjoy it ^_^&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-2676218250464462380?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/2676218250464462380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/05/our-first-game-is-on-android-market.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/2676218250464462380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/2676218250464462380'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/05/our-first-game-is-on-android-market.html' title='Our first game is on the Android Market!'/><author><name>paul</name><uri>http://www.blogger.com/profile/08385585864019040360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/Sv85rYG9TBI/AAAAAAAAAAM/zkcLrmtmn3A/S220/6171_596993662761_1010423_34527747_2986305_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-8115328378572485886</id><published>2010-05-10T07:52:00.001-07:00</published><updated>2010-05-17T18:48:18.917-07:00</updated><title type='text'>Some Quick Links</title><content type='html'>Hey all,&lt;br /&gt;&lt;br /&gt;Short update, but a few links that address a few issues that we've run into:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;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 &lt;a href="http://kfb-android.blogspot.com/2010/05/making-random-suck-less.html"&gt;blog post&lt;/a&gt; details a way to get more widely distributed random numbers, albeit in &lt;em&gt;O(n)&lt;/em&gt; time.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I tried answering an Android question on &lt;a href="http://www.stackoverflow.com"&gt;Stack Overflow&lt;/a&gt; on &lt;a href="http://stackoverflow.com/questions/2800728/how-do-i-keep-from-running-out-of-memory-on-graphics-for-an-android-app/2800781#2800781"&gt;running out of memory in apps with lots of images&lt;/a&gt;.  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 &lt;a href="http://brownandroidattack.blogspot.com/2010/03/image-transparency-aka-absurd.html"&gt;Josh's excellent post&lt;/a&gt; on minimizing transparency losses.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Finally, while working with Preferences for Rat Race, I hit a really strange bug with &lt;span style="font-family:monospace"&gt;ListPreference&lt;/span&gt; where I could get a set of options, but when I tried to select them, they would crash the application.  The answer was in &lt;a href="http://advback.com/android/108/"&gt;this excellent blog post&lt;/a&gt;, where you learn the dangers of letting your list &lt;em&gt;labels&lt;/em&gt; be one type of array, but your list &lt;em&gt;values&lt;/em&gt; be another.  In Rat Race, I had to make all my numbers Strings and run &lt;span style="font-family: monospace"&gt;Integer.parseInt(String)&lt;/span&gt; on all my values, but it ran!&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;New!&lt;/strong&gt;  &lt;a href="http://brownandroidattack.blogspot.com/2010/03/messages-from-beyond-grave.html"&gt;Matt mentioned some issues with messaging&lt;/a&gt;, 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 &lt;a href="http://blog.radioactiveyak.com/2010/05/when-to-include-exit-button-in-android.html"&gt;responsibly exit an app&lt;/a&gt;, providing insights on common app-building gotchas along the way.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;That last snag was the closest I've come to having &lt;a href="http://www.globalnerdy.com/2010/05/09/new-programming-jargon/"&gt;stringly-typed&lt;/a&gt; data. ^_^&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-8115328378572485886?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/8115328378572485886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/05/some-quick-links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/8115328378572485886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/8115328378572485886'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/05/some-quick-links.html' title='Some Quick Links'/><author><name>paul</name><uri>http://www.blogger.com/profile/08385585864019040360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/Sv85rYG9TBI/AAAAAAAAAAM/zkcLrmtmn3A/S220/6171_596993662761_1010423_34527747_2986305_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-5302979553375411016</id><published>2010-04-29T19:27:00.000-07:00</published><updated>2010-04-29T19:51:23.856-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='demo'/><category scheme='http://www.blogger.com/atom/ns#' term='ratrace'/><category scheme='http://www.blogger.com/atom/ns#' term='platformer'/><title type='text'>Game updates!</title><content type='html'>The first is our new game, Platformer:&lt;br /&gt;&lt;br /&gt;&lt;object width="400" height="225"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=11344568&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=11344568&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;The other is an update of Rat Race, which I showed earlier:&lt;br /&gt;&lt;br /&gt;&lt;object width="400" height="225"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=11344878&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=11344878&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-5302979553375411016?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/5302979553375411016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/04/game-updates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/5302979553375411016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/5302979553375411016'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/04/game-updates.html' title='Game updates!'/><author><name>paul</name><uri>http://www.blogger.com/profile/08385585864019040360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/Sv85rYG9TBI/AAAAAAAAAAM/zkcLrmtmn3A/S220/6171_596993662761_1010423_34527747_2986305_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-6683354857173016910</id><published>2010-04-21T19:08:00.001-07:00</published><updated>2010-04-21T19:35:34.915-07:00</updated><title type='text'>SQLite gotchas</title><content type='html'>We will soon share some video of our final game, a simple platformer, but in the meantime I've run into a strange gotcha that might prove handy for others.&lt;br /&gt;&lt;br /&gt;It's well documented that a viable way to use SQLite on Android is as follows:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Subclass &lt;span style="font-family:monospace"&gt;SQLiteOpenHelper&lt;/span&gt; and override &lt;span style="font-family:monospace"&gt;onCreate&lt;/span&gt; and &lt;span style="font-family:monospace"&gt;onUpgrade&lt;/span&gt; to create your databases.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Call that subclass to get a &lt;a href="http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html" style="font-family:monospace"&gt;SQLiteDatabase&lt;/a&gt; object&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Call your SQL commands (usually queries) on the instance of &lt;span style="font-family:monospace"&gt;SQLiteDatabase&lt;/span&gt;, and use a &lt;span style="font-family:monospace"&gt;Cursor&lt;/span&gt; to navigate the results.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;But I found a curious bug:  Every time I queried my cursor, it returned 0 results.  I was sure my queries were well formed, and I'd tried using both &lt;a href="http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery(java.lang.String,%20java.lang.String[])" style="font-family:monospace"&gt;rawQuery&lt;/a&gt; and &lt;a href="http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery(java.lang.String,%20java.lang.String[])" style="font-family:monospace"&gt;query&lt;/a&gt;.  Given that I was getting 0 rows as a result, I looked at my INSERT code.&lt;br /&gt;&lt;br /&gt;None of the many fixes I attempted did any good, and &lt;a href="http://stackoverflow.com/questions/2577067/gotchas-inserting-into-sqlite-on-android"&gt;Stack Overflow was baffled with me&lt;/a&gt;.  But the Stack Overflow snippet I posted had the culpable code, which was the method I used to retrieve the cursor:&lt;br /&gt;&lt;div style="font-family:monospace; padding: 10px; background-color:#eee"&gt;&lt;br /&gt;private Cursor fetchLevelDynamics(int id)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;SQLiteDatabase db = this.leveldata.getReadableDatabase();&lt;br /&gt;&amp;nbsp;&amp;nbsp;try {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String fetchQuery = "SELECT row_num, col_num, type_dyn FROM " + DYNAMICS_TABLE + " WHERE level_id = ?";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String[] queryArgs = {Integer.toString(id)};&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Cursor cursor = db.rawQuery(fetchQuery, queryArgs);&lt;br /&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Activity activity = (Activity) this.context;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;activity.startManagingCursor(cursor);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return cursor;&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;finally {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;db.close();&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Presented on its own, the error is very obvious: I close the database in the &lt;span style="font-family:monospace"&gt;finally&lt;/span&gt; block, meaning the method returns a cursor pointing to a closed database.&lt;br /&gt;&lt;br /&gt;But strangely, &lt;strong&gt;calling accessors on that cursor doesn't throw an exception.&lt;/strong&gt;  The Cursor instead acts as if pointing to an empty data set, going out of bounds when you call specific fields, and returning 0 on getCount.&lt;br /&gt;&lt;br /&gt;This lame database-open/database-closed oversight was completely my fault.  Still, the behavior indicated a very different problem than the actual cause, and be on the lookout if your Cursors don't return data that you suspect is present.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-6683354857173016910?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/6683354857173016910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/04/sqlite-gotchas.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/6683354857173016910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/6683354857173016910'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/04/sqlite-gotchas.html' title='SQLite gotchas'/><author><name>paul</name><uri>http://www.blogger.com/profile/08385585864019040360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/Sv85rYG9TBI/AAAAAAAAAAM/zkcLrmtmn3A/S220/6171_596993662761_1010423_34527747_2986305_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-5314539809156949318</id><published>2010-03-28T12:39:00.001-07:00</published><updated>2010-04-10T11:25:13.780-07:00</updated><title type='text'>Messages From Beyond the Grave</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;Designing a game is different from designing a consumer application in a very basic way. Consumer applications tend to be event-driven with long periods of inactivity while waiting for input, while games tend to be constantly redrawing and recalculating in real time. The Android framework is designed to allow for easy creation of event-driven applications.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This leaves the game developer with an interesting quandary. To make a game, one must simulate a loop within an event driven environment. Many developers stuff their game logic inside of &lt;span style="font-family:Courier New;"&gt;onDraw()&lt;/span&gt; and then invalidate themselves as quickly as possible. This accomplishes the job, but it prevents them from invalidating only the areas of the screen that need to be repainted. For games where much of the screen does not change often, invalidating only changed areas of the screen can provide a large performance increase.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Luckily, the Android framework proves a way to hook into the message loop which drives the application. The &lt;span style="font-family:Courier New;"&gt;Handler&lt;/span&gt; class provides the ability for an application to send itself custom messages. This means that the game developer can separate game logic from rendering code for a cleaner structure.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;When we first implemented a game in this fashion, it would continue to use 100% CPU after it had finished. I was confused when I verified that the game was receiving the &lt;span style="font-family:Courier New;"&gt;onDestroy&lt;/span&gt; event, which indicates that the application's resources are about to be released.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;It turns out that in order to speed up subsequent launches of an application, Android caches processes from terminated activities. When cached, the process' message loop can still receive messages, presumably so that the OS can wake it up when the user chooses to launch that application again. Since we were sending a new custom event every time we received one, the process would continue to receive and act on our custom messages after the activity had been destroyed.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;A simple change that prevented the application from sending new messages after it had received a termination event fixed the issue.&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-5314539809156949318?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/5314539809156949318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/03/messages-from-beyond-grave.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/5314539809156949318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/5314539809156949318'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/03/messages-from-beyond-grave.html' title='Messages From Beyond the Grave'/><author><name>Wilde</name><uri>http://www.blogger.com/profile/12310009426208325477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/S3tth4djdII/AAAAAAAAABM/gQwNJ_NuqlQ/s320/matt.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-1901723097204519486</id><published>2010-03-22T16:12:00.000-07:00</published><updated>2010-03-22T17:48:27.741-07:00</updated><title type='text'>Image Transparency (aka an absurd application of convex hull)</title><content type='html'>&lt;span style="font-family:arial;"&gt;Android makes it very easy to load an image as a bitmap:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;int resID = context.getResources().getIdentifier(...);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), resID);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;But once you have that &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Bitmap&lt;/span&gt;&lt;span style="font-family:arial;"&gt;, if it has significant transparency, kiss your performance goodbye. Getting decent performance back is going to be anything but easy. For our Penguins game we wanted to have all images of the penguins (one per frame of animation) to be identically sized so that they could be easily positioned. This means that each image (frame of animation) has a large amount of fully transparent pixels. Drawing all of these fully transparent pixels absolutely destroyed our frame rate in the emulator. Essentially, the emulator has dreadful alpha blending performance.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;So, the question was - how could we keep our images with lots of fully transparent pixels and have good performance? The obvious answer was to have Android draw as few of the fully transparent pixels as possible. The &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Canvas&lt;/span&gt;&lt;span style="font-family:arial;"&gt; class which is used for drawing has the following method:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Canvas#clipPath(Path path);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;So it was now necessary to build the best possible &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Path&lt;/span&gt;&lt;span style="font-family:arial;"&gt; around each penguin image. I wanted a programmatic solution, particularly because at the time of writing the code I was not working with the final artwork. So the first step was to figure out an efficient way to access all of a bitmap's pixels. &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Bitmap&lt;/span&gt;&lt;span style="font-family:arial;"&gt; has a convenient method to access an individual pixel, but calling that methods tens of thousands of times for each image results in dreadful performance. (Even though this computation is only done while the game is loading, not each frame.)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Turns out there's a very easy way to get the pixels as a linear array&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;int width = bitmap.getWidth();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;int height = bitmap.getHeight();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;int[] pixels = new int[width*height];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;bitmap.getPixels(pixels, 0, width, 0, 0, width, height);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Now that we have the pixels we want find the boundary pixels. (Note: If our images had fully transparent pixels inside of non-transparent pixels this approach would not have worked as well.) So the next step was to find all of the boundary pixels:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ArrayList&lt;Point&gt; points = new ArrayList&lt;Point&gt;();&lt;br /&gt;for(int x = 0; x &lt; width; x++)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;int firstY = -1, lastY = -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;for(int y = 0; y &lt; height; y++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;boolean transparent = (pixels[y*width+x] == Color.TRANSPARENT);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(!transparent)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(firstY == -1)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;firstY = y;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lastY = y;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;if(firstY != -1)&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;points.add(new Point(x, firstY));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;points.add(new Point(x, lastY));&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;A &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Path&lt;/span&gt;&lt;span style="font-family:arial;"&gt; could then be built from these pixels. (If we were to actually do this, it would be easier to build the &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Path&lt;/span&gt;&lt;span style="font-family:arial;"&gt; using two &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;ArrayList&lt;/span&gt;&lt;span style="font-family:arial;"&gt;s, one for top half, the other for the bottom &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Path&lt;/span&gt;&lt;span style="font-family:arial;"&gt;.) I gave this a try, and the performance was marginally better. The &lt;span style="font-family:courier new;"&gt;Path&lt;/span&gt; fit &lt;/span&gt;&lt;span style="font-style: italic;font-family:arial;" &gt;perfectly&lt;/span&gt;&lt;span style="font-family:arial;"&gt; and therefore had an enormous amount of line segments in it. I had just traded one performance slow down for another. I wanted a way to have a &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Path&lt;/span&gt;&lt;span style="font-family:arial;"&gt; that was guaranteed to include all of the penguin, would not have many fully transparent pixels, but also a lot less line segments. I had an absurd idea - why not implement the &lt;/span&gt;&lt;a style="font-family: arial;" href="http://en.wikipedia.org/wiki/Convex_hull"&gt;convex hull algorithm&lt;/a&gt;&lt;span style="font-family:arial;"&gt; over the boundary points? So I did, and it worked. Performance increased dramatically. I was now drawing a few fully transparent pixels, but the &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Path&lt;/span&gt;&lt;span style="font-family:arial;"&gt; object had far fewer line segments.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Below is a diagnostic mode where the clipping &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Path&lt;/span&gt;&lt;span style="font-family:arial;"&gt; is being draw. The bottom penguin is in mid-left thwack.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="font-family: arial;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_8Z7ukutkNYE/S6gIq5g99MI/AAAAAAAAAUs/pZr6YzEqniA/s1600-h/convex_hull_thwack_left.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 320px;" src="http://3.bp.blogspot.com/_8Z7ukutkNYE/S6gIq5g99MI/AAAAAAAAAUs/pZr6YzEqniA/s320/convex_hull_thwack_left.png" alt="" id="BLOGGER_PHOTO_ID_5451616882018612418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-1901723097204519486?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/1901723097204519486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/03/image-transparency-aka-absurd.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/1901723097204519486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/1901723097204519486'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/03/image-transparency-aka-absurd.html' title='Image Transparency (aka an absurd application of convex hull)'/><author><name>Josh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_8Z7ukutkNYE/S6gIq5g99MI/AAAAAAAAAUs/pZr6YzEqniA/s72-c/convex_hull_thwack_left.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-9026476352458343735</id><published>2010-03-22T14:24:00.000-07:00</published><updated>2010-03-22T14:35:52.073-07:00</updated><title type='text'>A Personal Project</title><content type='html'>Fliptile!&lt;br /&gt;&lt;br /&gt;&lt;object width="400" height="300"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10357311&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=10357311&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;This was a personal game I made 'off the books' two weekends ago.  There's lots to be done, but hopefully this will whet your appetites ^_^&lt;br /&gt;&lt;br /&gt;This is a clone of &lt;a href="http://en.wikipedia.org/wiki/Tetris_Attack"&gt;Tetris Attack&lt;/a&gt;.  As promised, a link to &lt;a href="http://www.youtube.com/watch?v=VEd3i-Zx96Q"&gt;some gameplay of the original&lt;/a&gt; (rather, a re-release as &lt;em&gt;Pokemon Puzzle League&lt;/em&gt;).  Since this is such a direct copy, I doubt I'll distribute it on a marketplace or anything (at least unless I think of a cute &lt;a href="http://www.npr.org/templates/story/story.php?storyId=99338221"&gt;Lexulous&lt;/a&gt;-like workaround).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-9026476352458343735?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/9026476352458343735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/03/personal-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/9026476352458343735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/9026476352458343735'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/03/personal-project.html' title='A Personal Project'/><author><name>paul</name><uri>http://www.blogger.com/profile/08385585864019040360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/Sv85rYG9TBI/AAAAAAAAAAM/zkcLrmtmn3A/S220/6171_596993662761_1010423_34527747_2986305_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-8681060446315362012</id><published>2010-03-22T07:24:00.001-07:00</published><updated>2010-03-22T07:30:35.838-07:00</updated><title type='text'>Penguins!</title><content type='html'>Hey all,  here's a small video demo-ing our newest game, (the imaginatively titled) Penguins!&lt;br /&gt;&lt;br /&gt;&lt;object width="400" height="300"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10342389&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=10342389&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;As promised in the video, here's &lt;a href="http://www.cs.cmu.edu/~baraff/sigcourse/"&gt;a link to the Whitkin-Baraff papers&lt;/a&gt; from SIGGRAPH '97 for modeling physics.  This was pointed out to us by &lt;a href="http://www.cs.brown.edu/people/faculty/cjenkins.html"&gt;Chad&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Also, I kind of lied in the video, I said we were running (in better conditions) at 17-18 FPS.  I think we go significantly higher (closer to 23-25), I just slipped while narrating.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-8681060446315362012?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/8681060446315362012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/03/penguins.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/8681060446315362012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/8681060446315362012'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/03/penguins.html' title='Penguins!'/><author><name>paul</name><uri>http://www.blogger.com/profile/08385585864019040360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/Sv85rYG9TBI/AAAAAAAAAAM/zkcLrmtmn3A/S220/6171_596993662761_1010423_34527747_2986305_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-596557798690259797</id><published>2010-03-16T22:15:00.000-07:00</published><updated>2010-03-16T22:17:49.804-07:00</updated><title type='text'>Matt is Awesome</title><content type='html'>Hey all,&lt;br /&gt;&lt;br /&gt;Very soon we will introduce our newest game.  In the meantime, to make up for the lack of updates, &lt;a href="http://www.morepaul.com/2010/03/fun-twist-on-queues-from-stacks.html"&gt;read about a very cool data structure hack&lt;/a&gt; our teammate Matt found.  I think it's very cute; it blew my mind a little.  He tells you how to implement a queue using only one instance of a stack ^_^&lt;br /&gt;&lt;br /&gt;Soon, be ready for some hungry penguins!&lt;br /&gt;&lt;br /&gt;-Paul&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-596557798690259797?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/596557798690259797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/03/matt-is-awesome.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/596557798690259797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/596557798690259797'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/03/matt-is-awesome.html' title='Matt is Awesome'/><author><name>paul</name><uri>http://www.blogger.com/profile/08385585864019040360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/Sv85rYG9TBI/AAAAAAAAAAM/zkcLrmtmn3A/S220/6171_596993662761_1010423_34527747_2986305_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-5966438209328542902</id><published>2010-03-06T09:29:00.000-08:00</published><updated>2010-03-06T09:50:01.153-08:00</updated><title type='text'>Home Screen Icons</title><content type='html'>I ran into an interesting issue while testing my minigame, Moles. Once I had the core game working, I decided to add an intro screen that would allow you to pick a difficulty. I made a separate Activity for it and changed the settings in the manifest to account for this. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Launching from Eclipse worked fine, but when I launched the game from the Home screen icon I had made for the game, I got this error:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;02-18 01:51:43.750: ERROR/Launcher(106): Launcher does not have the permission to launch Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=cs134.adventure.minigames.moles/.MolesActivity }. Make sure to create a MAIN intent-filter for the corresponding activity or use the exported attribute for this activity.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;After much fussing, I discovered that the Home screen icon didn't work, while the one on the programs menu did. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;It seems that the Home screen icons are not deleted or updated when an application is uninstalled or reinstalled. Moreover, rather than referencing the manifest, the icon seems to cache the main Activity and ask Android to launch that directly.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-5966438209328542902?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/5966438209328542902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/03/home-screen-icons.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/5966438209328542902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/5966438209328542902'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/03/home-screen-icons.html' title='Home Screen Icons'/><author><name>Wilde</name><uri>http://www.blogger.com/profile/12310009426208325477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/S3tth4djdII/AAAAAAAAABM/gQwNJ_NuqlQ/s320/matt.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-9139026695122418129</id><published>2010-02-19T21:51:00.000-08:00</published><updated>2010-03-22T14:48:27.435-07:00</updated><title type='text'>Rat Race!  A minigame.</title><content type='html'>Hey all!&lt;br /&gt;&lt;br /&gt;To get familiar with the framework, the four of us produced individual minigames.  Below is a small demo of mine, Rat Race.&lt;br /&gt;&lt;br /&gt;&lt;object style="width:400px; height:300px; display:block; margin: 10px auto"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9592857&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=9592857&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;I'll post something over the weekend on the game's internals as well as some lessons learned, but in the meantime I hope this video suffices.&lt;br /&gt;&lt;br /&gt;Notes:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;As promised, &lt;a href="http://www.youtube.com/watch?v=3uvM-vKVgGQ"&gt;a link to the game that I took the concept from.&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;My apologies to any deaf or hearing impaired, I was unaware before uploading that Vimeo didn't support closed captioning.  I'll make a point to upload a YouTube version.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-9139026695122418129?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/9139026695122418129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/02/rat-race-minigame.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/9139026695122418129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/9139026695122418129'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/02/rat-race-minigame.html' title='Rat Race!  A minigame.'/><author><name>paul</name><uri>http://www.blogger.com/profile/08385585864019040360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/Sv85rYG9TBI/AAAAAAAAAAM/zkcLrmtmn3A/S220/6171_596993662761_1010423_34527747_2986305_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2820553293105918062.post-4229321946315937876</id><published>2010-02-16T19:50:00.000-08:00</published><updated>2010-02-16T20:36:33.232-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='people'/><category scheme='http://www.blogger.com/atom/ns#' term='brown'/><title type='text'>Welcome to Brown CS134!</title><content type='html'>&lt;h3&gt;What is this?&lt;/h3&gt;&lt;br /&gt;Four &lt;a href="http://cs.brown.edu/"&gt;computer science&lt;/a&gt; concentrators at &lt;a href="http://brown.edu"&gt;Brown University&lt;/a&gt; are pursuing an Independent Study with Professor &lt;a href="http://www.cs.brown.edu/people/faculty/cjenkins.html"&gt;Chad Jenkins&lt;/a&gt;.  We plan to investigate the elements of successful game development, with a focus on mobile platforms and the constraints they impose.&lt;br /&gt;&lt;h3&gt;Who are you?&lt;/h3&gt;&lt;br /&gt;Your cast of characters is composed of:&lt;br /&gt;&lt;br /&gt;&lt;div style="height:187px;"&gt;&lt;br /&gt;&lt;img style="float:left; margin:0 10px 10px 0; width: 150px; height: 186px; display: block; clear:both;" src="http://3.bp.blogspot.com/_3ys1dwfzc2w/S3tthoJTqyI/AAAAAAAAABE/CWBBQiMY-oQ/s320/lyla.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5439061399459572514" /&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href="http://www.cs.brown.edu/people/lfujiwar/"&gt;Lyla Fujiwara&lt;/a&gt;&lt;/strong&gt;, class of 2010.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="height:187px;"&gt;&lt;br /&gt;&lt;img style="float:left; margin:0 10px 10px 0; width: 150px; height: 186px; display: block; clear:both;" src="http://4.bp.blogspot.com/_3ys1dwfzc2w/S3tth4djdII/AAAAAAAAABM/gQwNJ_NuqlQ/s320/matt.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5439061403839460482" /&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href="http://www.cs.brown.edu/people/mwilde/"&gt;Matt Wilde&lt;/a&gt;&lt;/strong&gt;, class of 2011.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="height:187px;"&gt;&lt;br /&gt;&lt;img style="float:left; display:block; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 150px; height: 186px; clear:both;" src="http://4.bp.blogspot.com/_3ys1dwfzc2w/S3tthSxdRSI/AAAAAAAAAA8/VPnwgdh2NRk/s320/josh.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5439061393722393890" /&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href="http://www.cs.brown.edu/people/jak2/"&gt;Josh Kaplan&lt;/a&gt;&lt;/strong&gt;, class of 2011.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="height:187px;"&gt;&lt;br /&gt;&lt;img style="float:left; display:block; margin:0 10px 10px 0; width: 150px; height: 186px; clear: both;" src="http://4.bp.blogspot.com/_3ys1dwfzc2w/S3tthyRnFHI/AAAAAAAAABU/1V6Jy16AuB0/s320/paul.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5439061402178753650" /&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href="http://www.cs.brown.edu/people/pmeier/"&gt;Paul Meier&lt;/a&gt;&lt;/strong&gt;, class of 2010. (&lt;a href="http://morepaul.com"&gt;personal&lt;/a&gt;, &lt;a href="http://pw.brown.edu/wiki/people/paul_meier_09"&gt;theatre&lt;/a&gt;)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;What can we expect?&lt;/h3&gt;&lt;br /&gt;We expect to post documentation of our efforts, as well as lessons learned in Game Development, Android Development, and their intersection.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2820553293105918062-4229321946315937876?l=brownandroidattack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brownandroidattack.blogspot.com/feeds/4229321946315937876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brownandroidattack.blogspot.com/2010/02/welcome-to-brown-cs134.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/4229321946315937876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2820553293105918062/posts/default/4229321946315937876'/><link rel='alternate' type='text/html' href='http://brownandroidattack.blogspot.com/2010/02/welcome-to-brown-cs134.html' title='Welcome to Brown CS134!'/><author><name>paul</name><uri>http://www.blogger.com/profile/08385585864019040360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://4.bp.blogspot.com/_3ys1dwfzc2w/Sv85rYG9TBI/AAAAAAAAAAM/zkcLrmtmn3A/S220/6171_596993662761_1010423_34527747_2986305_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3ys1dwfzc2w/S3tthoJTqyI/AAAAAAAAABE/CWBBQiMY-oQ/s72-c/lyla.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
