processing will spit out an error if my code has an error, but it will not run if i have valid code, the run button shows that its been activated but nothing happens. not sure what to do but its driving me nuts. initially when installing i had android code working, but not normally, it would run it. nothing would happen. but when i unplugged my phone the app was on it, even if it wasnt while running. i have processing on two other PCs but my laptop (vista) doesnt. anyone ever have this issue and found a solution? thank you
ACTION_DOWN and ACTION_MOVE only register surfaceTouchEvents on the initial touch or on a moving touch, but never a standstill touch. Is there a constant that will track non-moving touches?
Seems either one I use I cause my game to freeze. Not all the time, but when i pull finger off the spots that activate particular actions rapidly and constantly it frequently causes the game to crash. I dont remember having a issue when it was single touch, but since ive been trying with multitouch it causes problems. What is the proper way of implementing multi touch does this code look flawed? Is it missing something? if my touches are within the designated spots do i need a else condition for when they are not?
Oh and is there a way of making it so it registers my touches even if I dont move my fingers? it seems to stop activating once both of my touches stop moving.
Also I use mouseX and mouseY to clear the initial splash screen. Could that cause confusion? but the issue never arises that early in the game.
Please and thank you for any help in regards to this.
void setup(){
//within setup i have the touches array
xTouch = new float[10];
yTouch = new float[10];
}
public boolean surfaceTouchEvent(MotionEvent event){
final int action = event.getAction();
TouchEvents = event.getPointerCount();
for (int i = 0; i<TouchEvents; i++){
int ID = event.getPointerId(i);
switch(action){
case MotionEvent.ACTION_DOWN:{
xTouch[ID] = event.getX(i);
yTouch[ID] = event.getY(i);
if (xTouch[ID] >= 50 && xTouch[ID] <= 250 && yTouch[ID] >= 521 && yTouch[ID] <= 721){
my_ship.shoot();
x_angle = atan2(yTouch[ID]-620, xTouch[ID]-100);
}else if (xTouch[ID] >= 1050 && xTouch[ID] < width-50 && yTouch[ID] >= 521 && yTouch[ID] <= 721) my_ship.push();
//else thrusters = false;
}
case MotionEvent.ACTION_MOVE:{
xTouch[ID] = event.getX(i);
yTouch[ID] = event.getY(i);
if (xTouch[ID] >= 50 && xTouch[ID] <= 250 && yTouch[ID] >= 521 && yTouch[ID] <= 721){
my_ship.shoot();
x_angle = atan2(yTouch[ID]-620, xTouch[ID]-100);
}else if (xTouch[ID] >= 1050 && xTouch[ID] < width-50 && yTouch[ID] >= 521 && yTouch[ID] <= 721) my_ship.push();
}
}
}return super.surfaceTouchEvent(event);}
public boolean surfaceTouchEvent(MotionEvent event){
TouchEvents = event.getPointerCount();
for (int i = 0; i<TouchEvents; i++){
int ID = event.getPointerId(i);
xTouch[ID] = event.getX(i);
yTouch[ID] = event.getY(i);
I just want to make a copy of the app ive made and send it to a friend, via email, and have him download it on his phone. If I do this do i need to do all that is required to get an app on the play store or can i just export and send email and he just put it on his phone via email?
What am I doing wrong here? the scores.txt file is sitting in the data folder and outside the data folder within the folder this processing file is located. i hit ctrl z and its the same folder. Why wont this work? The text file has only 1 stringed word. error message: The file "scores.txt" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
i created the file with the saveStrings() method, so i know its in the correct filetype
Some reason my two functions (mousePressed/mouseReleased) are not changing my boolean variable. they are working perfect in Java, but when I switch modes to JS they are not, is there a syntax difference that Im not finding or something?