Questions tagged [breakout]

Tag for questions related to pset3, Breakout.

Filter by
Sorted by
Tagged with
0
votes
1answer
50 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
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
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: ...
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 ...
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 ...
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.
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
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 ...
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
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
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
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
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), "...
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
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
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
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 ...
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
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
3answers
194 views

So close on Breakout Problem set 3

When I run breakout.c with clang breakout.c it gives me "errors" EDIT: I also run this with make breakout (removeing the row_space) and gives me this ' breakout.c:(.text+0x1b8): undefined reference ...
0
votes
1answer
39 views

pset 3 breakout “return ball” doesn't seem to go back to main function

The code below is not completed yet, but I am running into one major problem. When I first had my code typed in, I did not write in the main function and I got the ball moving and the paddle going etc....
0
votes
1answer
55 views

HELP! pset3 breakout ball not bouncing

I have been having serious issues with this particular project. Somehow I followed all the instructions in the bounce video and I have written all my codes but my ball is not bouncing off ANYTHING ...
0
votes
1answer
40 views

pset3 breakout scoreboard not adding

I have been going through the project and I am kind of stuck in one step. When ever my ball bounces and breaks a brick, the scoreboard somehow doesn't add. I have gone through my code a few times and ...
0
votes
1answer
282 views

How to install SPL libraries on ubuntu?

I was following instructions here https://github.com/cs50/spl apt-get install -y build-essential git openjdk-7-jdk git clone git@github.com:cs50/spl.git cd spl make sudo make install make gcc -o ...
0
votes
1answer
152 views

Problem instantiating bricks in breakout

How can I put some code here to have someone help me figure out why all my bricks aren't printing, my paddle isn't instantiating and my ball isn't moving? I need help!
0
votes
1answer
261 views

ball colliding with scoreboard

Just as the title says. When I remove the function to make the scoreboard the ball moves past the middle of the screen. I've tried using draw() and sendToBack() on the label thinking the ball would ...
1
vote
1answer
152 views

Why function initBricks is void type if initBall is GOval?

i was wondering why those functions are different types ? Especially why initBricks is void? // prototypes void initBricks(GWindow window); GOval initBall(GWindow window); GRect initPaddle(GWindow ...
1
vote
1answer
86 views

Compiling pset3 breakout on my native ubuntu

I want to run the breakout game on my native ubuntu. I tried installing the SPL files and making certain changes to the Makefile. But it's still not compiling. Has anyone else got it to work?
0
votes
2answers
89 views

Bricks for Breakout won't fill top of window

My bricks don't fully print. I get: XXXXXXXXXX XXXXXXXXX XXXXXXXXX XXXXXXXXX XXXXXXXXX I can't figure out why I am missing the first brick in each of rows 2-5 ...
0
votes
1answer
32 views

Can students use cs50 library in breakout?

I am asking since it was not included in the distro
0
votes
1answer
39 views

pset3 breakout infinite lives and scoreboard not adding

I have looked through many similar questions and some seemed to be the same as my problem but the solutions did not work. Basically, as the title says, the game plays but when bricks are removed, ...
0
votes
1answer
382 views

Segmentation fault with PSet 3 - Breakout!

I'm currently working on the PSet 3 - Breakout. As of now, I'm getting an error that says "Segmentation fault" and I'm not able to figure out that why is it giving so. I'm little bit sure that ...
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
45 views

Breakout compiles but doesn't run

Hi I've been working on/stuck on breakout for about a month now and still can't seem to figure out what's wrong with my code. My program compiles without any errors but if I run it, it doesn't work. ...
0
votes
1answer
40 views

PSET3 breakout weird bug when creating bricks

I am trying to build the bricks for the breakout assignment and I have a weird bug. I was trying to work out the spacing between the bricks and the it's fine EXCEPT when there are 10 columns. 9 ...
4
votes
4answers
1k views

Running breakout on Mac OS X

There's a similar question about running breakout on Linux variants: Can't run Breakout outside of appliance My question is specifically about compiling breakout (and hence SPL) on Mac OS X. So ...
0
votes
1answer
64 views

Breakout click to start

having trouble implementing the code that will make the ball wait for a click. I have implemented code that allows the restart through the click, but can't seem to do it from the start. I have read ...
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
1answer
34 views

Actually creating rows in breakout. I cant get the bricks to jump to the next line

I'm trying to get 10 bricks in the columns and 4 rows of bricks, however all the bricks are on the same line. Can someone please help? if you need more info let me know. Thanks void initBricks(...
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
1answer
60 views

Breakout: Ball won't bounce off walls

Something is going on here that I don't understand. The ball disappears when it hits a wall. The live counter seems to be working because the game is done after 3 tries even though the ball is not ...
0
votes
1answer
362 views

Segmentation fault when using GDB to debug breakout

When I run GDB on pset3 breakout, this is what I get. How can I tell what is causing the segmentation fault & where it is? If I enter list, i get 1 dl-debug.c: No such file or directory
0
votes
1answer
110 views

question about pset3/breakoout

I have finished the breakout and it can be compiled. However, when I execute it, "segmentation fault(core dumped)" appears. I test the code block by block and find the code below generate the problem ...
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
108 views

pset3 - Breakout - Can't start again after loosing my first live

All my program work well till I lost my first ball. After that, I'm not able to start with an other one. I thought I've controlled that with my second while loop. There the first part of my code in ...
0
votes
2answers
195 views

Placing bricks precisely with initBricks (using floats and integers)

i'm trying to be very precise with the positioning of my bricks when using initBricks. however they are not placing exactly where they should be 9out by small fractions) and i'm pretty certain it is ...
0
votes
2answers
93 views

Pset3 Breakout: Question on variable scope in while loop

I'm working through pset3 and noticed that when I declare my ball's velocities outside the while loop, my collisions against the wall's edges work, i.e. the ball bounces away, but when the velocities ...
1
vote
1answer
106 views

Breakout program freezes when i make it wait for click to start.

I have later done with waitForClick() function but want to know whats the problem with the below code. bool start = true; while (lives > 0 && bricks > 0) { // Creates a mouse ...