The repetitive ricochet issue is mentioned in the course, and I think everyone has experienced it at some point (normally when you are desperately trying to test something else!)…
There is a part in one of the lectures when Ben adds a tweak to the ricochet so that it’s rebound is a little more random, that said I found that this wasn’t sufficient to prevent it from happening all of the time.
You could tackle it in several ways, in fact a few people have already posted how they over came it, for example;
- you could adjust Ben’s tweak to make it more dramatic (quick fix but not ideal)
- you could check the vector and only use it if the angle is greater than a certain value
- you could consider the point of impact on the paddle and adjust the vector based on that (note, I can confirm this won’t eradicate the issue completely on it’s own)
- you could add a count for the number of times a repetitive rebound occurs and then blow the ball up (at perhaps no cost to the player), or, maybe trigger a really exaggerated vector at this point and have it bounce off randomly.
The original Arkanoid did something rather similar to the last suggestion above, I have it on the XBox at the moment and it is riddled with bugs! lol…
Incidentally, it can (and does) occur horizontally as well as vertically.