Dectection between objects
in
Programming Questions
•
10 months ago
Hey guys working on my final, I'm not a great programer and I'm pushing the limits of what i know with this final but I'm trying to get this game to work and I'm having a problem with the logic with everything detecting each other here the sample of the game with the code i put it in open processing so you guys could take a look and give lend me a hand in trying to finish this.
http://www.openprocessing.org/sketch/82862
My problem so far
Class_bullet idk how to make it so that all the ships shot right now i know that i might need an array but the way i have my game setup the
x = myEnemy.enemyX; // start with a random x location
y = myEnemy.enemyY; //start a little above the widnow
this is how I make one of my enemy shoot not all of them
and then i need both bullets to start shooting between the players and the enemies. Thanks in advance for a taking a look, like i said I'm trying to get this done but having a hard time, the example of the book does the math with radius to do the intersect but I'm using images.
http://www.openprocessing.org/sketch/82862
My problem so far
Class_bullet idk how to make it so that all the ships shot right now i know that i might need an array but the way i have my game setup the
x = myEnemy.enemyX; // start with a random x location
y = myEnemy.enemyY; //start a little above the widnow
this is how I make one of my enemy shoot not all of them
and then i need both bullets to start shooting between the players and the enemies. Thanks in advance for a taking a look, like i said I'm trying to get this done but having a hard time, the example of the book does the math with radius to do the intersect but I'm using images.
1