String title= "4331a"; //boundary// int left=20, right= left+600; int top=50, bottom= top+400; Player joey; // object // void setup() { // screen set up // size (right+20,bottom+30); reset(); } void reset() { //Create a players// joey= new Player (); joey.name= "Joey"; // another player // bob= new Player (); bob.name= "Bob"; } void draw() { // move joey and draw // scene(); joey.move(); joey.show(); bob.move(); bob.show(); } void scene() { // draw field w/ grass on bottom // fill (0,100,255); stroke (5); rectMode (CORNERS); // screen // rect(left, top, right, bottom); text( title, 7.5,25); // grass // fill (0,255,0); rect(20,350, 620, bottom ); // made a change here // } class Player { // joey moves and speed // float x=100, y=100; // placement on screen float dx=3,dy=2; // speed of movement per frame // String name= "Joey"; // player's name // int r1=100, g1=150, b1=50; int w=30, h=50; // bob moves and speed // float x=100, y=100; // placement on screen float dx=3,dy=2; // speed of movement per frame // String name= "bob"; // player's name // int r1=100, g1=150, b1=50; int w=30, h=50; void move() { // move players // if (xright-w/2) dx= -dx; // bounce // if (ybottom-h/2) dy= -dy; // bounce // x += dx; y += dy; } void show() { // show the players // rectMode (CENTER); fill(100,150,50); rect (x,y,w,h); ellipseMode (CENTER); ellipse(x,y-h/2-12, 24,24); // i had a different number here, i changed it to look like yours/ fill(0); text(name, x-18, y-10); } }