|
Post by huddshroom on Sept 30, 2010 19:03:16 GMT 1
mac osx: hotfile.com/dl/72833493/7f69bf3/application.macosx.zip.htmlwindows: hotfile.com/dl/72833598/f796f33/application.windows.zip.htmllinux: hotfile.com/dl/72833665/71b1378/application.linux.zip.htmlif anyone is interested in learning simple processing, here's a start, you can tweak the code. there are download links up there which has the actual program and source code with it. //int expos stores information int means integer box which means it has to be a solid number int xpos; //float can store numbers with decimal points float testval; //this is a new int which will be used for the y axis int yow; //new variable for y axis int yinc; int xinc;
void setup(){ //this sets up the canvas size size(800,600); //this prints whatever i tipe in the brackets println("dont let it hit the sides"); //this shows the colour of the inside and outside of the shape stroke(255); fill(255); //smooth out the graphics smooth(); //the means expos equals 50 which can change in the position, look down, whatever is in xpos xpos=50; //this means yo is eaqual to 50 stil but for the y axis yow=50; //CHANGE THE VALUES OF XINC AND YINC FOR SPEED OF ELLIPSE yinc=14; xinc=14; } void draw(){ //background colour 0=black use rbg or grayscale to change colour background(450); //this prints the line over and over again // println("drawing"); // this is the position and size of the eclipse x,y positions ,h,w ellispe size ellipse(xpos,yow,40,40); // this makes add one to xpos so it moves one each time xpos=xpos+xinc; //this makes yow(y axis) move down 4(yinc), while x axis is only going 1, so the eclipse goes down fast than it moves to the side yow=yow+yinc; //this will tell the computer what to do if the ellipse goes off screen if (yow>600){ // telling the compter to display text if the eclipse hits the bottom println("BOTTOM WAS HIT!!!!!!"); //when yow hits the bottom it will go back by 4 yinc=yinc*-1; } //same but for if it hits the top if (yow<0){ println("HIT THE TOP!!!!!!!"); yinc=yinc*-1; } //for the sides if (xpos>800){ println("RIGHT WAS HIT!!!!!!"); xinc=xinc*-1; } if (xpos<0){ println("LEFT THE TOP!!!!!!!"); xinc=xinc*-1; } }
|
|
|
Post by tonywal on Sept 30, 2010 19:23:31 GMT 1
Wow
|
|
|
Post by Waar is dat feestje? on Oct 3, 2010 14:46:29 GMT 1
mac osx: hotfile.com/dl/72833493/7f69bf3/application.macosx.zip.htmlwindows: hotfile.com/dl/72833598/f796f33/application.windows.zip.htmllinux: hotfile.com/dl/72833665/71b1378/application.linux.zip.htmlif anyone is interested in learning simple processing, here's a start, you can tweak the code. there are download links up there which has the actual program and source code with it. //int expos stores information int means integer box which means it has to be a solid number int xpos; //float can store numbers with decimal points float testval; //this is a new int which will be used for the y axis int yow; //new variable for y axis int yinc; int xinc;
void setup(){ //this sets up the canvas size size(800,600); //this prints whatever i tipe in the brackets println("dont let it hit the sides"); //this shows the colour of the inside and outside of the shape stroke(255); fill(255); //smooth out the graphics smooth(); //the means expos equals 50 which can change in the position, look down, whatever is in xpos xpos=50; //this means yo is eaqual to 50 stil but for the y axis yow=50; //CHANGE THE VALUES OF XINC AND YINC FOR SPEED OF ELLIPSE yinc=14; xinc=14; } void draw(){ //background colour 0=black use rbg or grayscale to change colour background(450); //this prints the line over and over again // println("drawing"); // this is the position and size of the eclipse x,y positions ,h,w ellispe size ellipse(xpos,yow,40,40); // this makes add one to xpos so it moves one each time xpos=xpos+xinc; //this makes yow(y axis) move down 4(yinc), while x axis is only going 1, so the eclipse goes down fast than it moves to the side yow=yow+yinc; //this will tell the computer what to do if the ellipse goes off screen if (yow>600){ // telling the compter to display text if the eclipse hits the bottom println("BOTTOM WAS HIT!!!!!!"); //when yow hits the bottom it will go back by 4 yinc=yinc*-1; } //same but for if it hits the top if (yow<0){ println("HIT THE TOP!!!!!!!"); yinc=yinc*-1; } //for the sides if (xpos>800){ println("RIGHT WAS HIT!!!!!!"); xinc=xinc*-1; } if (xpos<0){ println("LEFT THE TOP!!!!!!!"); xinc=xinc*-1; } }Kids stuff..... Try C#
|
|
|
Post by huddshroom on Oct 7, 2010 17:17:33 GMT 1
that's why i said simple, C# is programming not processing. C# is way too complected for me atm. just about managed to make a pong game by using the stuff above and tweaking and added.
|
|