So, I made a small program using the Android mode in Processing, then selected "Export Android Project" -- It exported a bunch of files to an "android" folder. Namely, these:
assets/
libs/
res/
src/
AndroidManifest.xml
ant.properties
build.xml
local.properties
project.properties
Keeping in mind that I'm a
complete newbie, and am on Windows, how would I compile this into a .apk (I don't need it signed, as it's just for my personal android device)?
So I have a little program that randomly "walks" (x++, x--, y++, y--) around the screen, creating ellipses of a given radius (int). The walker loop is bounded within the screen. I also have a separate program that counts seconds, and displays them on the screen when the draw loop is ended (noLoop).
What I want to do is stop the loop when the screen has no more black areas (that are, of course, <radius) -- how can I input that into processing?
Walker code:
class Walker {
float x;
float y;
float change =10;
Walker() {
x = width/2;
y = height/2;
}
void display() {
ellipse (x, y, change, change);
}
void step() {
float r = random(1);
if (r < 0.25) { //change value to change probability (dont forget to change others)
// fill(random(255), random (255), random(255)); //RGB - Random:)
fill(255, 0, 0); //RGB - R color
x+=change;
}
else if (r < 0.5) {
// fill (random(255),random( 255),random (255)); //RGB - Random:)
fill (0, 255, 0); //RGB - G color
x-=change;
}
else if (r < 0.75) {
// fill (random(255), random (255), random (255)); //RGB - Random:)
fill (0, 0, 255); //RGB - R color
y+=change;
}
else {
fill (255);
y-=change;
}
if (x>width) { //boundary
x-=change;
}
if (x<0) { //boundary
x+=change;
}
if (y>height) { //boundary
y-=change;
}
if (y<0) { //boundary
y+=change;
}
}
}
Walker walker1;
void setup() {
size(600, 600);
background (0);
walker1 = new Walker();
}
void draw() {
println(millis()/1000); //see how long it takes to fill screen! prints time in seconds;;
Hey Guys. So, I have just started using processing/programming 2 days ago, and have decided to try animating something. So far, I made a basic pacman outline, and my goal is now to make his mouth open and close (I've tried just randomizing the arc, but seeing as that goes through all the positions instead of just open and closed, it made my poor pacman look like he was having a seizure) -- however, no matter what I try, I for some reason cannot loop these 2 different frames. I'll put in the code for the body just in case, and would be very grateful if anyone could help;;