I'm still trying to figure out how to work Box2D. For my program, say I have a player, enemies, weapons, etc.
Question 1: Where do b2Bodys fall in the picture? Should it be an IS-A or HAS-A relationship? I'm using Box2D mainly for collision and have objects moving all over the place. I need to figure out if objects collide and if so remove the Missile (Weapon) and update damage on the object hit.
Question 2: How do I process collision? I tried to read the manual but am a little bit confused. Do I make my game manager extend the ContactListener class or what? Plus I'm assuming I have to use filters to make sure the player's shots only affect the enemy and vice versa.
Question 3: How do I set constraints for my window? Should I make a few shapes on the outside and if objects hit the shapes they should be destroyed?
I think that's all for now, I might have more later. I really wish there were better tutorials for Box2D; the learning curve for this library is pretty steep. Most tutorials I find are for Actionscript. There should also be a Help subforum.
Question 1: Where do b2Bodys fall in the picture? Should it be an IS-A or HAS-A relationship? I'm using Box2D mainly for collision and have objects moving all over the place. I need to figure out if objects collide and if so remove the Missile (Weapon) and update damage on the object hit.
Question 2: How do I process collision? I tried to read the manual but am a little bit confused. Do I make my game manager extend the ContactListener class or what? Plus I'm assuming I have to use filters to make sure the player's shots only affect the enemy and vice versa.
Question 3: How do I set constraints for my window? Should I make a few shapes on the outside and if objects hit the shapes they should be destroyed?
I think that's all for now, I might have more later. I really wish there were better tutorials for Box2D; the learning curve for this library is pretty steep. Most tutorials I find are for Actionscript. There should also be a Help subforum.