I've put together a space invaders clone in java, I have an array of 55 invaders, doing their invader thing, with a ship at the bottom doing it's thing.
Now what is the best way to detect that a players' shot has hit an invader ? Is to check for the colour at specific points, ie check what colour is just in front of the missile and if it's an invader colour then I've hit something ? or is to cehck the x,y co-oords of the invader array against the x,y of the player shot ?
I thought of colouring each invader in a specific color and then mapping that colour to each invader in the array, so that when a missile hits a specific colour you find which invader it is mapped to and score a hit and blank the invader.. the mapping contains the array element number of the zapped alien... am I on the right track ?
Thanks in advance,