Audrey M. Roy

Art, design, Python, JavaScript, and general silliness 
Filed under

phonegap

 

My big secret project with Fuzzy Rainbow

I wish I could post screenshots of the app I'm working on with Fuzzy Rainbow.  But I can't talk too much about it yet.

It's a Python/AppEngine + OpenSocial + JavaScript + jQuery UI app.  All the interaction & graphics are done with pngs and crazy JavaScript tricks because @shazow introduced me to the magic of jQuery & jQuery UI and convinced me that JavaScript could do anything.  Working on Fluffy Puffy Cloud Pets also taught me this to some extent, although I did nothing but draw clouds (and integrate my teammates' code) for that project, and I was skeptical of JS back then.

No canvas, no Flash.  If this turns out to be the wrong approach, I'm not afraid to throw away 2 months of code and rewrite it. 

The app is pretty odd.  Things do funny things.  It's either a game or a tool, depending on the user's perspective.

More pieces are coming down the line.  There will likely be a Pinax-based standalone site centered around the app.  There will also likely be a mobile client (maybe PhoneGap).  And more that I absolutely can't mention.  It's pretty ambitious, but it's just a matter of doing it piece-by-piece and cutting out pieces if needed. 

All the seemingly-scattered hacks & experiments that I've done over the summer are now coming together.  It is much more planned and well-thought-out than it might have appeared.  I am excited that I can say this much & can't wait to reveal more.

Filed under  //   Fuzzy Rainbow   Google App Engine   JavaScript   jQuery   OpenSocial   PhoneGap   Pinax   Python  
Posted by email 

Comments [1]

Processing.js for mobile devices

I completely adore Processing.js, John Resig's port of the Processing graphics programming language to JavaScript.  Everything that guy creates is a treasure.  As you might know, he's also the creator of jQuery, which is one of my favorite things.

I've been thinking a lot about how Processing.js would be great for making mobile apps.  I guess there are a couple of possible approaches:

  • something analogous to PhoneGap that turns your Processing.js code into native graphical apps optimized for each mobile device
  • an ultra-lightweight, specially-optimized (if that's even possible) subset of the parts of Processing.js that are most interesting to mobile apps and/or games, analogous to XUI

There have been a couple other Processing ports, an iPhone version (wish I could find the source) and a Flash/ActionScript one

And why Processing.js rather than the original Processing?  Because then you could reuse the code on the web.

I have a special interest in making something like this, since it would simplify a lot of my current work.  If you're interested in collaborating with me on this or know of anyone who might be, let me know.

Filed under  //   JavaScript   jQuery   mobile   PhoneGap   Processing   Processing.js   XUI  
Posted by email 

Comments [0]

Android Dev Challenge

I made it!  I'm so tired.  I think I'm going to sleep for the next 12 hours and then take a break from coding tomorrow. 

I submitted two apps:

  • Brain Combustion: Multiples (bcmult.apk)
  • Clouds (clouds.apk). 
I haven't released Clouds to the Android Market yet because I want to work on it more.  So it's only available to the public through this post, for now :)

The uploader was acting unpredictably, but I think they went through.  Anyone else have this problem?  I kept uploading the new version of clouds.apk and seeing the old logo.  I don't know if they got the latest version or not.  I was having lots of problems with bcmult.apk too.

Click here to download:
clouds.apk (162 KB)

Click here to download:
bcmult.apk (34 KB)

Filed under  //   Android   PhoneGap  
Posted by email 

Comments [0]

Work in progress - Cloud editor

This runs slow because it's the debug build.  The release version is faster.  Even then, the clouds are purposely drifty rather than speeding around the sky.

It's HTML5 canvas/JavaScript, created with PhoneGap and running on an Android G1 phone. 

2 options I'm considering:

  1. Add more features and release it as a separate app.  
  2. Turn it into a game, e.g. trap birds by surrounding them with clouds.  (I don't know, I'm not so into this, too boring.)
  3. Integrate it with the code for "Brain Combustion: Multiples" as a bonus feature every 10 levels or so, where you get cloud coins as a result of your hard work.  Is that too weird?  The multiples game is almost totally unrelated.

(I'm open to advice)

Filed under  //   HTML 5 Canvas   JavaScript   PhoneGap  
Posted by email 

Comments [1]

My Android math multiplier game

Here's a video of my Android game working on the G1.  Currently the game has no sound because there's a bug in my sound-playing code that makes the app crash.  Hopefully there will be boings whenever you click in the real version. 

I'm open to ideas about how to make better use of the Android's sensors in the app.  I was thinking that it could give you hints when you shake the phone.  E.g. all the multiples of 4 would fall to the left side when you shook it to the left (at a 20-point penalty). 

This is just the development version.  I'll announce it's real title when it's officially out, which is something new that I came up with last night.

  

Filed under  //   Android   games   PhoneGap   programming   projects   XUI  
Posted by Audrey M Roy 

Comments [4]

PhoneGap - AudioFlinger error while receiving a Gmail email

In my (XUI) on click handler, I have this:
navigator.notification.beep(2);


The problem is that beeping stops working after awhile.  I think it stops working whenever my phone receives a network tickle from Gmail.

If I keep playing the game after the sound stops, the app crashes entirely after a little longer.  That's really bad.

The log.txt showing the AudioFlinger error & Gmail notification:  

I'm stuck.  I guess these are my options:

  • Play a non-beep sound on click and see if it still happens.  Find a free wav to use.
  • If that doesn't help, look at PhoneGap.java to better understand how audio works in PhoneGap.  And learn how audio generally works when using the Android SDK.
  • Give up and remove audio from the game. 

Filed under  //   Android   audio   PhoneGap   programming  
Posted by Audrey M Roy 

Comments [3]

Progress on my first PhoneGap/XUI app

I'm making great progress with the app.  I wrote the code entirely from scratch tonight.  And the app mostly works now.  You click on boxes that match a specified condition to earn points.  The faster you do it, the more bonus points you get. 

I spent over an hour trying to figure out how to get the text from a DOM element with XUI.  It must be something like x$('#foo').text() or x$('#foo').html().nodeValue.  I tried a million things and couldn't figure it out.

I know that x$('#foo').html() returns a Javascript object because I printed it in an alert, but then I don't know what to do with the object.  If only I could run the app in Firefox and use Firebug, then I could inspect it.  I did try loading just the html file in Firefox and commenting out the link to phonegap.js, but that didn't work. 

Tomorrow:

  1. Figure out how to get the text of a DOM element with XUI.  Fill in the condition test that uses the text from the number box divs.
  2. Load state from somewhere (a text file?) upon app launch, and save it at the end of every level.
  3. Try to add some cute accelerometer-using feature to the app.
  4. Come up with a good name.  Firethink?  I don't know.  Something about speed/fire + math/thinking/mental workouts.

Filed under  //   Android   JavaScript   PhoneGap   programming   XUI  
Posted by email 

Comments [2]

PhoneGap sample project running in Android emulator

PhoneGap is awesome. 

I'm using Eclipse Ganymede, Ubuntu 9.04. 

To do:

  1. Get rid of scroll bar?
  2. Set up the Android vibration/sensor simulation tool.  I believe this is something separate?  Clicking 'Beep' makes noises, and 'Call 411' brings up the dialer with 411 properly, but that's all I could verify right now.

Filed under  //   Android   PhoneGap  
Posted by email 

Comments [0]