rgbk
YaBB Newbies
Offline
Posts: 7
Re: Mirroring output in realtime?
Reply #6 - Dec 21st , 2008, 11:16pm
I also couldn't get the vertex trick to work. Those new suggestions do seem snappier but arent fast enough yet. Ive been looking into creating a class which makes the lines but it seems really hard, with my newbie experience I cant get around how one is supposed to create two lines which do the exact opposite of each other. I want to do something like this (this is not correct syntax but just to explain: if (direction.equals("Right") ){ line1(xPos, yPos, xPos++, yPos); line2(xPos--, yPos, xPos, yPos); } if (direction.equals("Left") ){ line1(xPos--, yPos, xPos, yPos); line2(xPos, yPos, xPos++, yPos); } if (direction.equals("Up") ){ line1(xPos, yPos, xPos, yPos--); line2(xPos, yPos++, xPos, yPos); } if (direction.equals("Down") ){ line1(xPos, yPos++, xPos, yPos); line2(xPos, yPos, xPos, yPos--); } I cant do that because then the xpos and ypos are nulling each other out. So i have to double all my variables, this doesnt seem elegant, there's gotta be a way to do this more simply. I am definitely a newbie as you can tell. Other things I dont get is if I have on draw(): line(x,y,x,y++); line(x,y,x++,y); It makes one line instead of two, and combines the actions (it goes diagonally) Is there a way of ordering processing to make two separate lines do two different things without creating a class? Btw even though the image copying thing didn't work out its very good too know for the future, thanks.