How do I register contact in Processing?

edited December 2017 in Library Questions

I'm trying to develop Galaga in Processing, and I've made progress, but now I need to figure out how to register contact in the game, so that when the bullets hit the enemies they die, and when they touch the ship, the ship is destroyed. How do I do that? I have the files attached to this post. You'll need the Minim Library to run this. Any help is appreciated.

mediafire.com/file/0ot3rfzdob2jzxb/galaga.pde

Bat enemy_boss_a enemy_boss_b enemy_boss_c enemy_boss_d enemy_goei_a enemy_goei_a_combined enemy_goei_b enemy_goei_b_combined enemy_goei_c enemy_goei_c_combined enemy_goei_d enemy_goei_d_combined Galaga_Fighter king_D2 king_D3 king_D4 king_D5

Answers

  • You're going to have to implement collision detection. There isn't a single out-of-the-box approach to this.

    Shameless self-promotion: I wrote a tutorial on collision detection available here.

Sign In or Register to comment.