#red_handed
Explore tagged Tumblr posts
Video
tumblr
//Final Project //Minigame
// Daniel Mirete & Gonzalo Cordero
//We decided to make a game based on Boxing Robots in 2D.
Code:
- Boxin:
PImage Play; int state = 2; PImage blue_arm, blue_hand; PImage red_hand, red_arm; PImage redwin, bluewin; PImage Boxing; int AzulC = 0; int RojoC = 0;
int MAX_HIT_KEY = 2; void setup() { size(500, 500); Play = loadImage("Play.png");
// PLAYER
initGame(); }
void draw() { background(0, 0, 100);
//Menu if (state == 0) {
} else if (state == 2) {
drawGame(); drawPlayer(); } if (AzulC >= 20){ bluewin = loadImage ("bluewin.png"); bluewin.resize(280,145); image(bluewin, 110, 160); }
if (RojoC >= 20){ redwin = loadImage ("redwin.png"); redwin.resize(280,145); image(redwin, 110, 160); } text("Blue Robot: RIGHT " , 30, 50); text("Red Robot: SPACE " , 30, 70); text("hit: " + RojoC/2, 30, 30); text("hit: " + AzulC/2, 440, 30); text("Restart:ENTER ", 390, 50);
}
void mousePressed() { if (state == 0 && mouseOverButton1(160, 340, 260, 340)) { state = 1; } }
void keyPressed(){ println(keyCode); if (state == 1 && keyCode == 32) { state = 2; } if(state == 2 && keyCode == RIGHT){ blueMoveCounter++; AzulC ++;
if(blueMoveCounter % MAX_HIT_KEY ==0 ) blueMoveCounter = 0; }
if(state == 2 && keyCode == 32){ redMoveCounter++; RojoC ++;
if(redMoveCounter % MAX_HIT_KEY ==0 ) redMoveCounter = 0; }
if(state == 2 && keyCode == ENTER){ AzulC = 0; RojoC = 0; }
}
boolean mouseOverButton1(int x1, int y1, int x2, int y2) { if (mouseX > x1 && mouseX < y1) { if (mouseY > x2 && mouseY < y2) { return true; } } return false; }
- Game:
PImage rojo; PImage rojocuerpo; PImage rojocuello;
PImage azul; PImage azulcuerpo; PImage azulcuello;
PImage fondo;
int blueMoveCounter; int redMoveCounter;
void initGame() {
fondo = loadImage ("Background.png"); rojocuello = loadImage("Cuello rojo 2.png"); rojocuello.resize (50, 149); rojo = loadImage ("Cabeza rojo 2.png"); rojo.resize(120,110); rojocuerpo = loadImage("Cuerpo rojo 1.png"); rojocuerpo.resize (120,280); azulcuello = loadImage("Cuello azul 2.png"); azulcuello.resize (50, 110); azul = loadImage ("Cabeza azul 2.png"); azul.resize(120,110); azulcuerpo = loadImage("Cuerpo azul.png"); azulcuerpo.resize (120,280);
blue_arm = loadImage("resto brazo azul.png"); blue_arm.resize(90, 0); blue_hand = loadImage("antebrazo azul.png"); blue_hand.resize(150, 0);
red_arm = loadImage("resto brazo rojo.png"); red_arm.resize(90, 0); red_hand = loadImage("Antebrazo rojo.png"); red_hand.resize(150, 0);
}
void drawGame() { //background(255,0,0);
//background. resize image (fondo, -500,90); }
void drawPlayer(){ //Red neck
if (RojoC < 20){ image(azulcuello, 350, 215); image(azul, 290, 130); } else{ // cuello image(azulcuello, 350, 150); //head image(azul, 290, 90); }
if (AzulC < 20){ image(rojocuello, 100, 215); image(rojo, 90, 130); } else{ // cuello image(rojocuello, 100, 150); //head image(rojo, 90, 90); } //Red body image(rojocuerpo, 60, 230); //Blue neck //image(azulcuello, 350, 215); //Blue Head //image(azul, 290, 130); //Blue body image(azulcuerpo, 320, 230);
//Varibale Azul pushMatrix(); translate(370, 200);
float r1 = radians(map(blueMoveCounter, 0, MAX_HIT_KEY, 0, 90)); rotate(r1);
image(blue_arm, -30, 50);
pushMatrix();
translate(10, 125);
r1 = map(r1, 0, TWO_PI, 0, PI); rotate(r1);
image(blue_hand, -100, 25); popMatrix(); popMatrix();
//Variable Rojo pushMatrix();
translate(105, 150);
float r2 = radians(map(redMoveCounter, 0, MAX_HIT_KEY, -5, -75)); rotate(r2);
image(red_arm, -50, 100);
pushMatrix();
translate(0, 195);
r2 = map(r2, 0, TWO_PI, 0, PI); rotate(r2);
image(red_hand, -50, 10); popMatrix(); popMatrix();
}
0 notes
Text
Follow!!!!!!!!!!
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
http://red-handed-graffiti.tumblr.com/
#Red_handed#red_handed_graffiti#reading_pa#graffiti#urban#urban_art#tags#bombing#street_bombing#street art#street_art#streets#hip_hop#Magazine Red_handed_Magazine
0 notes
Photo
@saint_anw #saint_graffiti #saint_anw #saint_anw_cru #anw #anw_cru #Art_not_war #artists_not_warriorz #anarchists_of_the_new_world #reading_pa #handstyle #tag #urban #redhanded #red_handed #red_handed_graffiti #graffiti #urban #city_life #marker
#urban#anarchists_of_the_new_world#saint_graffiti#city_life#red_handed#art_not_war#tag#red_handed_graffiti#marker#anw#graffiti#saint_anw_cru#reading_pa#anw_cru#saint_anw#redhanded#artists_not_warriorz#handstyle
0 notes
Photo
@saint_anw #saint_graffiti #saint_anw #saint_anw_cru #anw #anw_cru #Art_not_war #artists_not_warriorz #anarchists_of_the_new_world #reading_pa #handstyle #tag #urban #redhanded #red_handed #red_handed_graffiti #graffiti #urban #city_life #marker #sticker #slap_on
#urban#anarchists_of_the_new_world#saint_graffiti#city_life#red_handed#art_not_war#sticker#tag#slap_on#red_handed_graffiti#marker#anw#graffiti#saint_anw_cru#reading_pa#anw_cru#saint_anw#redhanded#artists_not_warriorz#handstyle
0 notes
Photo
@saint_anw #saint_graffiti #saint_anw #saint_anw_cru #anw #anw_cru #Art_not_war #artists_not_warriorz #anarchists_of_the_new_world #reading_pa #handstyle #tag #urban #redhanded #red_handed #red_handed_graffiti #graffiti #urban #city_life #marker
#urban#anarchists_of_the_new_world#saint_graffiti#city_life#red_handed#art_not_war#tag#red_handed_graffiti#marker#anw#graffiti#saint_anw_cru#reading_pa#anw_cru#saint_anw#redhanded#artists_not_warriorz#handstyle
0 notes
Photo
@saint_anw #saint_graffiti #saint_anw #saint_anw_cru #anw #anw_cru #Art_not_war #artists_not_warriorz #anarchists_of_the_new_world #reading_pa #handstyle #tag #urban #redhanded #red_handed #red_handed_graffiti #graffiti #urban #city_life #marker
#urban#anarchists_of_the_new_world#saint_graffiti#city_life#red_handed#art_not_war#tag#red_handed_graffiti#marker#anw#graffiti#saint_anw_cru#reading_pa#anw_cru#saint_anw#redhanded#artists_not_warriorz#handstyle
0 notes