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
1answer
161 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, ...
1
vote
0answers
96 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 ...
1
vote
1answer
152 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-...
1
vote
1answer
113 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 ...
1
vote
2answers
540 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.
1
vote
1answer
334 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 anoying and i can't find ...
1
vote
1answer
111 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 ...
1
vote
2answers
69 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 ...
0
votes
1answer
37 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) ...
0
votes
1answer
46 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, ...
0
votes
1answer
18 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 ...
0
votes
1answer
70 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, ...
0
votes
0answers
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 ...
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 (~/...
0
votes
0answers
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?
0
votes
0answers
50 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 ...
0
votes
1answer
45 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: ...
0
votes
1answer
99 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 ...
0
votes
0answers
152 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 ...
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
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
0
votes
1answer
167 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. ...
0
votes
1answer
89 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 ...
0
votes
0answers
55 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 -...
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
148 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 ...
0
votes
1answer
494 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), "...
0
votes
1answer
256 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 ...
0
votes
2answers
176 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 ...
0
votes
0answers
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 ...
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
0answers
878 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 ...
0
votes
1answer
122 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 ...
0
votes
0answers
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 ...
0
votes
1answer
472 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 ...
-1
votes
1answer
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 ...