Interactive Authoring: Moving shapes

In this project I wanted to try moving things around in reverse and making shapes flip around with the press of a button, I used just the triangle for this so to keep it simple. Here is a still image of the project. I also made it so that when the mouse is clicked then the square/rectangle moves as well as points on the triangle.
Here is my code:

//Refrences
int Nothing = 0;
int Berny = 1;
int Dual = 2;

//Double Digits
int Oryon = 12;
int Kennedy = 20;
int Alex = 22;
int Demon = 28;
int Life = 42;
int Coin = 50;

// Triple Digits
int Keagan = 100;
int Vampire = 110;
int Elf = 150;
int Goblin = 200;
int Godzilla = 230;
int Finals = 250;

// Set Up
void setup() {
size(200,200);
}
void draw() {
background(Alex);
stroke(Nothing);

// Growing and quick shrink Circle
if (keyPressed == true){
ellipse(Goblin,Vampire,Vampire,Vampire);
fill(Oryon,Kennedy,Vampire);
Goblin = Goblin – Berny;
Vampire= Vampire – Dual;
}
else{
ellipse(Goblin,Vampire,Coin,Coin);
fill(random(Alex));
}
// Spasming rectangle

if (mousePressed == true){
Elf = Elf – Berny;
Demon = Demon + Berny;
fill(random(Finals), random(Keagan), random(Oryon));
rect( Elf, Demon, Life, Life);
}
else{
fill(Keagan,Keagan,150);
rect( Elf, Demon, Life, Life);
}
// Clingy Triangle

if (keyPressed == true){
triangle(Goblin,Vampire,Godzilla,Berny,Demon,Elf);
fill(Finals,Keagan,Oryon);
Vampire = Goblin + Berny;
}
else{
triangle(Goblin,Vampire, Godzilla, Demon, Elf, Demon);
}

}

 

Advertisements

About Alex Mandzi

I'm a new artist and wish to become a game designer. I like cartoons and draw them as well.
This entry was posted in Computer Animation and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s