Skip to main content

Questions tagged [paddle]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
106 views

PSET3 Breakout detectCollision function working but ball not bouncing off paddle

As the title says the detectCollision function is working properly but the ball is not bouncing off the paddle. I stuck on a printf in the "if(object == paddle)" func and it shows that it is ...
CS50_on_the_go's user avatar
0 votes
1 answer
114 views

Pset3 Breakout: Ball is passing through the paddle despite collision code.

so my ball is passing through my paddle despite the collision code I implemented. //bounce off paddle and bricks GObject collision = detectCollision(window, ball); if (collision != NULL)...
peachykeen's user avatar
0 votes
0 answers
51 views

addToRegion not working pset 3

Get the following when I use addToRegion for the paddle, when breakout is executed. No other changes made, just trying to create the initial paddle. Does anyone know how to fix? jharvard@appliance (~/...
Steve23455's user avatar
1 vote
1 answer
110 views

Segmentation Fault w/paddle movement (already changed initPaddle return)

I instatiated the bricks and paddle without any trouble, but when I try to have the paddle move with the mouse I get a segmentation fault. And this error doesn't occur until I move my mouse over the ...
Warrenwa5's user avatar
0 votes
0 answers
39 views

Cannot get both ball and paddle to work at the same time

Breakout: If I put return ball inside the while loop, I get a working paddle but the ball doesn't move. If instead, I put return ball outside the while loop or have no return at all, the ball moves, ...
KimPhilby's user avatar
0 votes
0 answers
142 views

Paddle lags while ball is moving (Pset3 breakout)

Hey guys sorry in advance if I format this wrong it's my first time posting here. The problem i'm having with my code is the paddle lags maybe about 10 seconds behind the actual input while the ball ...
Daniel 's user avatar
0 votes
0 answers
92 views

Why paddle is not visible at bottom middle of window?

I have instantiated the function initPaddle(). The function returns a paddle and I can see it in the window at various location coordinates that I provide. But, when I provide location coordinates ...
Bireschandra Bhaumik's user avatar
0 votes
1 answer
510 views

Pset3, detect collision, paddle not ‘colliding'

I used the code given in the set GObject object = detectCollision(window, ball); if(object !=NULL) { if(object== paddle) { y_velocity=-y_velocity } } else if (strcmp(getType(object), "...
kames's user avatar
  • 1
1 vote
1 answer
136 views

Ball bounces just above paddle

When I run the following code the ball bounces just above the paddle (around 10 pixels above the paddle). I haven't messed with the detect-collision function and following are my initPaddle() and code ...
Ibrahim's user avatar
  • 428
0 votes
0 answers
123 views

Paddle movement: how to check for window's boundaries more efficiently?

I just implemented my paddle movement function: // height and width of game's window in pixels #define HEIGHT 600 #define WIDTH 400 // Looks of the paddle #define PADDLE_WIDTH 80 #define ...
abelinux's user avatar
  • 1,170
0 votes
1 answer
66 views

Polygon paddle instead of rect

I tried to construct a GPolygon (code following) for my paddle instead of a GRect. I found that the detect collision function didn't work for this paddle, but i can't really see why. Perhaps its ...
omcdonnell's user avatar
0 votes
2 answers
382 views

detect collision paddle Pset4

My detect collision or detect walls algorithm does not seem to be working. The ball does not seem to be bouncing off the walls or detecting objects. What's annoying is that I was able to get the ...
William Kenney's user avatar