CS discoveries unit 3 lesson 20

@mscomptchrl,

This happens because the collision lasts longer than a split second so the frog is touching the fly through multiple cycles of the draw loop and each time the score will increase by one (or the health will decrease by 1).

There are a number of ways to “fix” this. The one I usually use is to “move” one of the colliding sprites to another position right after the collision (off the screen, for example), however, there are other ways.

Here is a previous thread where some of these other methods are discussed. U3L16 - Collision score - limiting to +1

Hope that helps!!!

Mike