Grid grid; Psycho[] psychos; int state; int rows; int cols; void setup(){ size(600,600); background(0); smooth(); stroke(40); //noStroke(); initGrid(); state = 0; size(600,600);//silly but works } void initGrid() { rows = 40; cols = 40; int sq_width = 12; int sq_height = 12; int buffX = 0;//x separation between squares int buffY = 0; int init_offX = 65;//initial x offset int init_offY = 65; int numPsychos = 3; int alphaReduceInc = 5;//speed squares reduce alpha grid = new Grid(rows, cols, sq_width, sq_height, buffX, buffY, init_offX, init_offY, numPsychos,alphaReduceInc); } void draw(){ if (state == 0) { background(0); grid.draw(); state = 1; } else { background(0); grid.update(); grid.draw(); } } void mouseReleased() { //grid.update(); }