Walker hero; //arrays BasicBullet[] bullets; BugBase[] bugs; PlantBase[] plants; Explosion[] explosions; PlantBullet[] plantBullets; int bulletsCount; int bugsCount; int plantsCount; int plantBulletsCount; int explosionsCount; boolean keyUp, keyDown, keyLeft, keyRight; int weaponType = 0; //0 flamer, 1 machinegun... void setup() { int num = 5; //String windowWidthString = getParameter("WINDOWWIDTH"); //if (windowWidthString != null) { // num = Integer.parseInt(windowWidthString); //} size(500, 400); frameRate(40); hero = new Walker(100, 100, 3); bullets = new BasicBullet[120]; bugs = new BugBase[1801]; explosions = new Explosion[120]; plants = new PlantBase[40]; plantBullets = new PlantBullet[80]; //int num = 50; for (int i=0; i