Skip to main content

Questions tagged [breakout]

Tag for questions related to pset3, Breakout.

36 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
1 answer
182 views

Paddle is lagging and how to use drand48?

Well when I coded for the creation of paddle and the movement of the paddle in initpaddle(), it was moving fine but now after step 6 of the problem set. With the ball too moving the paddle is lagging, ...
Furrukh Jamal's user avatar
1 vote
0 answers
106 views

Cannot find lcs : Error when compiling window.c in breakout

I am having issue on using spl library in ubuntu. When I try to compile window.c using make as given in the instructions I am always getting the same error(in pic) even though the spl/include folder ...
kunal's user avatar
  • 10
1 vote
1 answer
161 views

Breakout (with no changes) won't compile

I always get the following messsage when I try to compile breakout in PSET3. jharvard@appliance (~/Dropbox/CS50/pset3/pset3/breakout): make breakout clang -ggdb3 -O0 -std=c99 -Wall -Werror -Wno-...
LDF's user avatar
  • 47
1 vote
1 answer
119 views

Why does setLabel() freeze the program randomly?

I have a decent implementation of the Breakout program that normally runs perfectly all the way through. I have noticed, however, that occasionally the program will freeze. After a joint effort of ...
MKrlt's user avatar
  • 13
1 vote
2 answers
561 views

Best solution to move the ball in Breakout?

What's the best solution for providing proper parameters (x,y) for move() function? "Move() function" we use it to move the ball in the Breakout game.
Ibrahim Alawwad's user avatar
1 vote
1 answer
348 views

CS50 pset 3 breakout segmentation fault when lives --;

I get a segmentation fault after x times i "die" (it varies) and if I decrement the lives each time the ball hits the bottom i get a segmentation fault after 1 time. It's very annoying and I ...
Toto De Brant's user avatar
1 vote
1 answer
122 views

what's the error in the below function

I tried to make my own function in pset4-breakout to move the paddle but when i run and take my mouse to the output window I always get segmentation fault. I have tried gdb also but still i'm not able ...
Anmol Narang's user avatar
1 vote
2 answers
86 views

what does "Unexpected error: decodeError: Illegal color value" mean?

I just finished the code for breakout.c and I received no errors when I typed in "make breakout". However when I typed in ./breakout I received a whole lot of errors saying that there was an ...
Bryan99's user avatar
  • 51
0 votes
1 answer
157 views

Breakout: having trouble tripling my ball

I am using a similar syntax and method to the one used to spawn multiple bricks. I first use a function in my Powerup class to put three ball classes in one table: function Powerup.triple(x, y, skin) ...
Gabriel Bruno's user avatar
0 votes
1 answer
155 views

GD50 - Breakout | Bad Argument #2 (Quad expected, got nill)

This problem is about adding a new Powerup feature to the Breakout game. I literally did what Colton did. The things what I did; "GenerateQuadsPowerups" function in Util, A new Powerup class, ...
Bora Özenbirkan's user avatar
0 votes
1 answer
27 views

Breakout / pause(function) slows the paddle

When I add pause(5) to the while loop, pause function makes the ball not zip around, it also seems to slow down the paddle responsiveness. What do I have to do to get around that? I do understand why ...
wingedRuslan's user avatar
0 votes
1 answer
80 views

Pset 3: Breakout initBricks implementation

I don't understand why my implementation of initBricks isn't working. I noticed that most people have been using nested loops for the ROWS and COLS and I don't particularly mind using doing that too, ...
Lidya Aberra's user avatar
0 votes
0 answers
22 views

pset3. breakout. help on sendBackward

I have a bug in my breakout code. For some reason the ball is arranged behind the score. I even put the code to fix it twice (used both sendBackward and sendToFront). But it didn't help. I need an ...
ruthless_g'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
0 votes
0 answers
58 views

Using removeGwindow is giving me <implicit declaration of function 'removeGwindow' is invalid in C99> error

I haven't changed any of the #include statements at the top of the file. The #include spl/gwindow.h is clearly there. What am I doing wrong?
Slh's user avatar
  • 9
0 votes
0 answers
57 views

After start to play with clicking the paddle or ball,only twice to loop but stops at third time

After twice playing the game since first click of the ball or paddle, but it stops that. Why cannot repeat the game until the bricks <0, something about the waitforclick problem I think. How to fix ...
user5231181's user avatar
0 votes
1 answer
49 views

GetWidth error CS 50 breakout

How do I fix this problem? breakout.c:109:26: error: expected expression if (getX(ball) + getWidth() >= getWidth(window)) ^ /usr/include/spl/generic.h:44:49: note: ...
user5231181's user avatar
0 votes
1 answer
171 views

Unable to resolve host address for the pset3.zip file

When I first encountered the error when downloading the pset3.zip file for problem set 3, I wasn't very worried because the pset3 html had directions on what to do for when that happened. It said that ...
asun77's user avatar
  • 1
0 votes
0 answers
154 views

Ball Not Bouncing in Breakout

I just started working on making the ball bounce in Breakout (not incorporating drand48 yet), but I have tried multiple things and it remains still. I have posted that area of code below and would ...
KJK's user avatar
  • 15
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
27 views

Fatal error spl/gwindow.h with version 29

When I try to begin breakout with pset 3, I run into Fatal error spl/gwindow.h although I have 2014 version 29 of the appliance. Really stuck here, any help would be great
Avery Fisher's user avatar
0 votes
1 answer
168 views

Breakout Bricks coding caused segmentation-fault error! HELP!

After coding my Bricks for BREAKOUT, I get Segmentation error and my Paddle, Ball, and Scoreboard no longer appear! The bricks look great, but everything else disappeared and I get the fault error. ...
Ty Powell's user avatar
0 votes
1 answer
94 views

Breakout - wall collisions work...sometimes

I'm trying to get the ball to collide with all of the walls of the window. My current code works for the first 3 seconds of gameplay but then the ball will jiggle through a wall. I'll show you the ...
brutalitea's user avatar
0 votes
0 answers
64 views

Linker error with breakout.c

I have attached the linker error and a listing of the files in the directory that contains breakout.c. I think I have the right setup, but it won't compile. the clang command is clang -ggdb3 -O0 -...
LDF's user avatar
  • 47
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
156 views

Pset3: First row of bricks are not removed (rest all are removed)

The first row of the bricks are not removed. The ball goes above the first row of bricks and bounces the top wall comes down. But still the top row bricks don't disapper. Is there something amiss with ...
Nikita '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
0 votes
1 answer
264 views

pset3: How to check for paddle edges?

When implementing breakout, i am having a hard time trying to figure out how to check if the ball hits the horizontal edges of the paddle. So far everything else works fine, but when the ball touches ...
Xihai Luo's user avatar
  • 305
0 votes
2 answers
178 views

How can I compile to Windows from the appliance?

I am currently using the appliance through VMWare, and while doing the breakout program I find myself with 2 problems. One the game runs quite laggy, both versions (staff and mine), and it is quite ...
Jose Mario Fajardo Rodriguez's user avatar
0 votes
0 answers
160 views

Error in breakout's ball bouncing off the edges

I am doing the pset3 breakout. while implementing the ball bounces off the edges, I did it successfully it is bouncing off whenever it touches the edges but it is giving me error ack after closing the ...
user299731's user avatar
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
0 answers
880 views

Breakout: Missing spl folder

Problem Set 3: https://d2o9nyf4hwsci4.cloudfront.net/2014/fall/psets/3/pset3/pset3.html (Section "Breaking Out", after "Backstory") Hello. I tried to do make window (for window.c) on the terminal and ...
PGrad's user avatar
  • 11
0 votes
1 answer
128 views

Why is my ball not being displayed?

Is there something wrong with the syntax because the ball is not being displayed on the window? Here's my code while(true) { GObject object; // initialized the velocity along x and y axis ...
pranav's user avatar
  • 43
0 votes
0 answers
132 views

Nothing inside my "while (lives > 0 && bricks > 0)" loop works in pset4

I've implemented the paddle movement (and very basic code for the ball to move just one way for now) inside the said loop, but none of it works and I can't understand why that would be the case. Is it ...
Alex Stafford's user avatar
0 votes
1 answer
484 views

pset 4 breakout ball hitting bricks

I am having trouble with hitting all my bricks. I'm done with all 10 steps in the pset but when I get to hitting the last 3 - 5 or so bricks, my ball doesn't have enough "randomness" to hit them. My ...
Msholly's user avatar
-1 votes
1 answer
169 views

(pset4) Why is the paddle not bouncing the ball?

Ok, soI have this code that makes it so that the ball just rests on the paddle instead of bouncing off. So, my solution would be to do something like break; but for if statements. Problem being such a ...
Phoxxent's user avatar