Sensing Bugs

Please fill out these questions for all feature requests and bug reports. If you're requesting a feature, please let us know why this feature is important or useful, not just what it should do.
Thanks!

  1. What browsers show this problem?
    Using Google Chrome.
  2. Please share an example project (if possible).
    https://imgur.com/a/YMHMv7v
  3. Describes the steps to reproduce this issue.
  4. What does Snap! currently do?
    The picture on the right is the code for the ball, where it is supposed to sense the paddle and then go in a certain direction depending on the user's input. It is also supposed when its y poisition is more than or equal to -125 and broadcast 'game over'. The ball is also supposed to sense when it hits the brick, hiding it and increasing the player's score by 1.

The picture on the right is for the paddle is suppsed to move according to the keys.

  1. What should Snap! do instead?

Instead, the ball would go through the paddle (but still broadcast hit) and if the ball goes below -125, it would still not broadcast 'game over'. I intended for the ball to move whenever it senses the top of the paddle and then move in the intended direction.

I don't think there are any bugs in Snap that affect your project.

I think you are trying to do too much at once.

I would just try and get the ball to bounce around the screen and to bounce off your paddle at first.

I would start by checking your code for the paddle - when you move left - you are setting y to -125 but when you move right you are setting y to -127.

Also, you are changing your x values and also then doing a move command

I would just change your x values

Then just get the ball to move around and check if its touching the paddle - don't try and get it to bounce off other sprites just yet

1 Like