0 votes

I'm making Breakout. It's going well. The base game is nearly done and I'm about to add juice. Just a few bugs to squash first.

I have an issue with the ball behaviour and I'm keen on opinions.

Sometimes the ball will hit a brick and start moving almost purely horizontal. This can go on for as many as 30-80 bounces before it makes its way back to the bat. It's REALLY annoying and dull.

What would be the best way to go about correcting this? Would I somehow check for angle, and if it hits X angle for Y bounces, force a new angle?

Does anyone have any other ideas? I don't want to make it overly fake, but it can't just sit in the boring horizontal X bounce loop for too long else the player will quit (and rightfully so).

in Projects by (810 points)

I guess it's about game design, not technical issue.

Definitely game design related. I posted it in the Projects area due to this. I assume that's ok?

1 Answer

0 votes
Best answer

I guess you have some problem with your physics logic.

I think Arkanoid solved this by adding an angle after some bounces (but I may be confusing with another breakout).

Maybe the most subtle hack could be not allowing "PI/2" angles, even adding or substracting 0.0005 degrees may help.

If your ball has an angular speed (that can't be zero), it can be used to calculate the bounce too.


Don't worry about faking things, you are looking for a good gameplay experience and that means faking lot of things ^^;

by (7,796 points)
selected by

Thank you. I played with a few ideas based on your feedback. In the end I ended up simply giving the ball .5 gravity. So it makes a beautiful and graceful fall as it starts hitting the wall too many times. I give the bat an extra 20% punch / power and it makes up for the sluggish feel it was getting from the gravity. It's near perfect now, well, good enough to not notice. Thanks again, it was really helpful.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories