Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoDBreakout- Strange collisions #18

Open
Cborek opened this issue Aug 24, 2018 · 2 comments
Open

MongoDBreakout- Strange collisions #18

Cborek opened this issue Aug 24, 2018 · 2 comments
Assignees
Labels

Comments

@Cborek
Copy link

Cborek commented Aug 24, 2018

Occasionally, the ball has clipped straight through the paddle upon hitting somewhere near the center. While I have been able to replicate the issue a few times, I'm still not sure of the exact circumstances that cause it. Though it seems to happen most often when the paddle isn't moving. I have noticed that when this happens the ball behaves as if it has hit the side of the paddle by bouncing in but continuing downwards. Perhaps it's something to do with the new changes?

I've also noticed that the ball will occasionally pass straight through a block without any sort of reaction. I haven't been able to find any specific circumstances that cause this to happen. As far as I can tell it occurs randomly.

Failed Test Case: MB-13, MB-14

@thawkin3
Copy link
Owner

thawkin3 commented Aug 24, 2018

@Cborek Thanks, I can try to reproduce it. Would it be possible to catch it on a screen recording video, or is that too much to ask? The whole game animation system is just one big loop that uses requestAnimationFrame and a canvas, so my best guess would just be that any strange behavior would be from a slight lag in the browser where some code was delayed at just the right time to cause a hard to reproduce issue. I can look through the hit detection code again to see how I can improve it, but it may just be a browser thing that I don't really have control over.

For the blocks, yeah it's possible that if the ball hits a block at an angle that it just passes right though it and destroys the block without bouncing. I'd need to go back and look at the code, but I think I'm only doing hit detection on the top middle and bottom middle of the ball, so if it hit a block at an angle from the side it's possible it wouldn't bounce. I kind of liked this behavior since that's similar to what can happen in the original Breakout, so I intentionally left that one in.

@thawkin3 thawkin3 self-assigned this Aug 24, 2018
@thawkin3 thawkin3 added the bug label Aug 24, 2018
@Cborek
Copy link
Author

Cborek commented Aug 25, 2018

@thawkin3 I'd be happy to try to get it on video. I'll also try to replicate the bug on different browsers to see if that changes anything. Currently, I'm using chrome.

When it comes to the blocks I actually agree that the ball passing through the blocks is kind of interesting. I honestly think that this one might improve the game if left in.

@Cborek Cborek closed this as completed Aug 28, 2018
@Cborek Cborek reopened this Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants