Questions tagged [paddle]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
99 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 ...
0
votes
1answer
113 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)...
0
votes
0answers
50 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 (~/...
1
vote
1answer
104 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 ...
0
votes
0answers
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, ...
0
votes
0answers
139 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 ...
0
votes
0answers
91 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 ...
0
votes
1answer
495 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), "...
1
vote
1answer
135 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 ...
0
votes
0answers
121 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 ...
0
votes
1answer
56 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 ...
0
votes
2answers
377 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 ...