Walker myShip; //Ship myShip; //arrays BasicBullet[] bullets; BugNormal[] bugsNormal; Explosion[] explosions; int bulletsCount; int bugsNormalCount; int explosionsCount; boolean keyUp, keyDown, keyLeft, keyRight; int weaponType = 0; //0 flamer, 1 machinegun... void setup() { size(500, 400); frameRate(45); myShip = new Walker(); //myShip = new Ship(); myShip.x = 100; myShip.y = 100; myShip.speed = 3; bullets = new BasicBullet[120]; bugsNormal = new BugNormal[1001]; explosions = new Explosion[120]; for (int i=0; i<23; i++) { bugsNormal[bugsNormalCount] = new BugNormal(new Vector2D(100, 200), 5, 3); bugsNormalCount ++; } for (int i=0; i<23; i++) { bugsNormal[bugsNormalCount] = new BugNormal(new Vector2D(200, 200), 9, 2); bugsNormalCount ++; } for (int i=0; i<23; i++) { bugsNormal[bugsNormalCount] = new BugNormal(new Vector2D(200, 300), 16, 1); bugsNormalCount ++; } for (int i=0; i<3; i++) { bugsNormal[bugsNormalCount] = new BugNormal(new Vector2D(400, 300), 29, 4); bugsNormalCount ++; } } void draw() { background(20, 10, 20); //noStroke(); //lightFalloff(1.0, 0.1, 0.0); //pointLight(102, 153, 204, mouseX, mouseY, 30); //fill(123); //rect(10, 10, 30, 30); myShip.update(weaponType); myShip.draw(); for (int i=0; i