freefly
12-06-2006, 07:18 AM
Hi all,
I am new to game programming. I am trying to write a simple game and I would like to know how to differentiate two rectangular bitmaps at run time. I have more than two types of bitmaps flying around in the screen when I shoot I need a mechanism to dectect what type of bitmap got the bullet. I know how to dectect the collision but how will I know what type of bitmap was it ? do I have to write a class for each category of bitmaps ? how will I get the object when there is a collision (ie. it's been hit ). May be I am missing something stupid...
Please give me some ideas. I am good at programming, so just I need some advice.
Thanks
I am new to game programming. I am trying to write a simple game and I would like to know how to differentiate two rectangular bitmaps at run time. I have more than two types of bitmaps flying around in the screen when I shoot I need a mechanism to dectect what type of bitmap got the bullet. I know how to dectect the collision but how will I know what type of bitmap was it ? do I have to write a class for each category of bitmaps ? how will I get the object when there is a collision (ie. it's been hit ). May be I am missing something stupid...
Please give me some ideas. I am good at programming, so just I need some advice.
Thanks