Questions tagged [breakout]

Tag for questions related to pset3, Breakout.

Filter by
Sorted by
Tagged 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
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
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
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
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
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 ...
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
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
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
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
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
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
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
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
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 ...
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
1answer
133 views

Pset3 Breakout Ball blatantly ignores velocity change when colliding with wall

Something rather strange is taking place while I test my collision detection for the ball hitting the walls. The code below to my eye seems correct to make the ball bounce off of all 4 walls of the ...
0
votes
1answer
83 views

Breakout ScoreBoard

int label_x = (WIDTH / 2); int label_y = (HEIGHT / 2); GLabel label = newGLabel("0"); add(window, label); setLocation(label, label_x, label_y ); return label; In this way of initilizing scoreboard ,...
0
votes
1answer
46 views

About Breakout part of the Pset3

Is there any idea how our breakout homework is graded or will it be graded?. I ask this because it seems like it needs a person to look it directly?
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, ...
0
votes
1answer
88 views

Pset 3 - breakout: drand() just return positive number, so the ball only begins moving to right. Right?

breakout: drand() just return positive number, so the ball only begins moving to right. Right? or is there some way to make de ball go to left randomly?
1
vote
1answer
82 views

What fonts are available using Stanford Portable Library?

Specifically for GLabels. I would just like to rub it in with some dark, bold text if the player loses. On the other hand, something celebratory would be in order for breaking out all bricks, right?
0
votes
1answer
56 views

Are we supposed to call add inside initialization functions?

In pset3 breakout, are we supposed to call add inside the initialization functions (e.g., initPaddle)?
0
votes
1answer
40 views

Is there something wrong with my computer?

Im trying to play the staffs implementation of breakout however when I try to move the paddle by using arrow keys..it seldom moves..is it aboout my computer or something
0
votes
1answer
93 views

When my ball collide paddle, i got segmentation fault

I am trying this error for hours, checked many segmentation faults, tried various code but i can not figure out why this is happening. breakout.c //Detecting collision GObject collision = ...
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
137 views

what am i suppose to do in pset3?

what am i suppose to do in Pset 3 ? what exactly am i suppose to submit ! please help i tried watching the walk through but it explains something else other than the pdf objective. http://cdn.cs50.net/...
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
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
3answers
89 views

Pset3 - Multiple nested if statements

I have been working on the pset3 Breakout problem, and find myself using many nested IF statements, specifically for the creation of the blocks, and the assigning of points based on where the block is ...
0
votes
2answers
431 views

Pset3 (breakout) — problems initiating score label

Below is the code I'm using to initiate the label showing the score. Unfortunately, the label doesn't appear on the screen, and I'm clueless as to why that is the case. I'd very much appreciate any ...
0
votes
1answer
147 views

Breakout: paddle no longer moves after ball movement inserted

I'm working on breakout and I am on step #6 where I have the bricks and paddle and now I'm working on the ball. However, after I got the ball to move, my paddle no longer moves and I have no idea why. ...
0
votes
1answer
110 views

Breakout.c: GLabel Looping

I have created a You Lose/You Win message after a player runs out of lives or hits all the bricks. However, the code I've used seems repetitive and that's always bad! I'm thinking I could put the ...
0
votes
1answer
294 views

Breakout: How do I remove a GLabel?

I'm trying to prompt the user to click to try again after he loses a life. I have implemented this by a GLabel. I am struggling to find a way to remove that GLabel message once the user has clicked to ...
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
2answers
122 views

Pset3: The ball doesn't move

I can't make the ball move. I don't know where is the mistake. I hope you can help me. Here is my code. [code removed by mod to comply with academic honesty] /** * Instantiates paddle in bottom-...
0
votes
2answers
81 views

pset3 breakout: Only prints one Column of bricks!

My code: int blockspace = 3; int blockx = 0; int blocky = HEIGHT/4; for (int i = 0; i < ROWS; i++){ for (int j = 0; j < COLS; j++) { GRect block = newGRect(blockspace/2 + ...
0
votes
1answer
80 views

Breakout paddle disappears if I try to add color to the bricks

I'm working on Breakout and making good progress. I'm at the point where I'd like to add color to the bricks. I've implemented an array of colors that the 'if' loop iterates through to add color. The ...
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
1answer
50 views

Stanford Portable Libraries not found [duplicate]

When I try to compile breakout I get the following error: breakout.c:16:10: fatal error: 'spl/gevents.h' file not found #include <spl/gevents.h> Did I miss an update?
0
votes
1answer
341 views

pset3 --> label

in pset3 --> breakout I haven't been able to make the Scoreboard (label) to update after each brick broken or ball touching the bottom. I am printing in the gedit terminal the values of "lives" and "...