Thursday, September 06, 2007

Common Game-Programming Mistakes #34 & #35

* When looping through the sprites in your game to check for collisions against each other, you check a sprite for collision against itself, which is why the sprite always collides with something immediately.

* Also, forgetting to implement special code to ensure that two sprites that shouldn't collide, don't. Typically, when a sprite shoots a bullet, the bullet will start on top of the shooting sprite, causing a collision immediately when the bullet is fired.

No comments: