Im not sure if I am the only one messing with Processing for Android in eclipse so this might not be of much interest to many folks but I have been experimenting with making processing embed-able in an application as well as being able to be a full screen activity. It actually took only a few edits to the PApplet source which I posted on my github page. Basically i just converted the PApplet class from an Activity to a Fragment (which is a newer API for Honeycomb). This makes managing sketches as application components really easy.
There are for sure somethings that would need to be addressed to make this ideal but so far it seems to be pretty sweet. I made a couple really quick demo apps showing how easy it is to incorporate into an Android app.
This one is a compilation of some of the Processing examples that come with PDE. If the sketch title is pressed multiple times it toggles between displaying the sketch in the frame of displaying the text that draws that sketch.
As soon as I threw this together I started wondering if there would be interest/use for a full blown examples app... not sure yet
and then this little app just demonstrates how easy it is easy to use the Android UI to control your processing sketch. I have to say, this is so far the most fun aspect. Since processing has understandably not been easy to throw in a java/android app, it's nice to be able to make a sketch and have a robust UI separate but playing well together.
Not sure if the edits are worth making a "library" since they are just that, a few edits. I think the main thing I am going to shoot for next is doing this with the new compatibility library which will allow this to be backwards compatible to Android 2.2. For now ill just leave it on my github page. If anyone has any thoughts or suggestions I would love to hear
I have been working on a project for a little while which I am excited to share and hopefully get some feedback on. Basically I wanted to have a system which allowed me to not worry about any of the Android overhead or recreating interactive shapes with bounds checking if statements etc. The library I have been working on, which is tentatively called DroidGraph, is the beginning of my attempt to deal with some of these issues. The goal is to be able to have an idea for not only a sketch, but an app with custom GUIs and interactions and be able to implement it in more of a sudo code format.
The library has a few core features which might be useful right away to some people:
- multi touch MotionEvent management which parses all event data into digestible data
- built in picking system which handles all of pointer to node attaching as well as local pointer data for each node
- ActionListening interfaces for easy implementation of gui features
- scene graph management of node groups including transformations like translation, scale, rotation etc.
and for HoneyComb users, the library has the needed methods to support 3.x Animation classes which makes for very cool, and extremely easy to make animated user interfaces and drawings.
This is currently very much in the early stage and should be considered experimental. I will be going over tutorials and examples on my blog http://ghostandthemachine.github.com/ and discussing more features and development. My hope from the beginning has been to have a totally open project so if anyone has any suggestions, bugs, or best of all contributions, please feel free contact me.
Refer to my blog for setting up in Eclipse and with more current Android API levels. I am having issues compiling a jar to be used with PDE, but that is on the way.
I am wondering if anyone else is seeing this issue. When I have some thing like 10, 50x50 roundrect shapes in my sketch my fps will hang closer to 40. When I change those to normal rects it goes back up to 60.
Is this just an issue with open gl es, or maybe A3D? Obviously the round rect has far more triangles in it so it logically would be more work to draw, the 20 frames a second just seems to be a heavy hit. Im wondering if it something I am doing
I am trying to do a sketch where I don't clear the background but just keep drawing on the screen. I don't think drawing to a buffer would really do this efficiently so I am trying to just control the frame clearing. In the desktop processing I think you just leave out the background(r, g, b) call, but when I do that in android the screen still clears out black.
I have been messing around with various combinations of Android animation features for Honeycomb as well as trying to find the most optimal Processing configuration for not only my tablet but others. I have a few observations I would be interested to hear from others about on there own devices
first off, my setup
Motorola Xoom 32g wifi only. Rooted, and updated to Honeycomb 3.1
- A2D has such slow performance I can't really use it. Frame rate is between 10-15fps with nothing in the sketch
- A3D is really snappy running at 60fps and dips down to as low as 30fps if I do serious collision detection iterating through a scene. In general though, good performance.
My thought is that the A3D is faster due to it running on the gpu with opengl, is anyone else having this performance gap between the two?
How is processing-android performing on the GalaxyTab 10.1, Transformer, Asus ePad, etc.?
I was hoping to use the Picking library, from the user libraries for processing, but realized it would need some tweaking. When I was trying to update the classes for Android Processing, I hit a couple bumps.
The first is that create graphics is throwing an error at line 614 (which is pg = new PGraphicsAndroid3D();) It seems like this should be ok since PGraphicsAndroid3D extends PGraphics..... I pass PApplet.A3D as the irenderer param, but regardless, it is erroring.
When trying to update the picking.Buffer class, which originally extended P3D, to extending PGraphicsAndroid3D I also had issues. Mainly, that the Processing Android version of PGraphics doesn't support the same pGraphics.recorder() functions. I checked the source and found that is all commented out. Not sure if there is a similar thing I am missing specifically for Android.
If no one has any info on the specifics, has anyone had luck drawing to an offscreen buffer in Android? or a picking system for Android?