Breakout help Programming Software Development by Viped … pong game so I thought next step could be simple breakout. I already got ball and bat made by Rectangle. How… Breakout Ball bouncing physics Programming Game Development by CoolGamer48 Hey, so I'm making a Breakout game in C++ w/ DirectX, and I'm having some … of the ball bouncing physics. The way I've made breakout games before was to have the ball only move at… Re: Breakout Ball bouncing physics Programming Game Development by MattEvans … perfect player. I am not sure if that's how breakout always is.. Alot of basic collision detection code assumes that… spinning ) after the bounce.. but.. that just wouldn't be breakout would it. ]] Breakout In C# Programming Software Development by aquaticdeity Hi am learning c# myself.I have created a [B]Breakout [/B]using c#.But am struck with one problem.When … System.Linq; using System.Text; using System.Windows.Forms; namespace Breakout { public partial class Form1 : Form { private const int WIDTH = 500… Re: Breakout In C# Programming Software Development by aquaticdeity … System.Linq; using System.Text; using System.Windows.Forms; namespace Breakout { public partial class Form1 : Form { #region variables private const int… Breakout game Programming Software Development by asian_al Im trying to make a breakout game. I cant seem get the score to show up, … Breakout 3D Sample vPython App Programming Software Development by Reverend Jim I wrote this 3D Breakout game as a sample project to learn both Python and the visual module, vPython. It is based on a similar game I had on my Amiga back in the 80s. I don't expect that my Python is either standard or as elegant as it could be so constructive feedback is always appreciated. Re: Breakout 3D Sample vPython App Programming Software Development by TrustyTony … hitting plane based on current movement direction. In one 2d breakout example the bounce was implemented object oriented way and the… Classic breakout game in Opengl - Need Help with Code Programming Game Development by binaryjc **BREAKOUT GAME IN OPENGL** code is in C. Use the 's' … Re: Breakout help Programming Software Development by Viped Okay I hesitated little with my question. Right after posting I realized that I can use object arrays. But how about angles? Re: Breakout help Programming Software Development by NormR1 By angles do you mean the changes in the x and y locations of the object as it moves? If you change only the x value then the object moves horizontally. Changes in the y value moves the object vertically. Changes of both will move somewhere in between. Re: Breakout help Programming Software Development by Viped Yeah that much I know. I mean how I should determine about which angle the ball hits to te paddle or walls or brick. And I also got weird problem. Some of bricks wont destroy after first hit of ball. Here's the code: Board.java package net.viped; import java.awt.Color; import java.awt.Graphics; import java.awt.Rectangle;… Re: Breakout help Programming Software Development by NormR1 How do you execute the code for testing? I don't see a main() method. Have you tried debugging the code by adding printlns to show the values of variables as they are changed and used? I see one println but it doesn't show which item it is refering to. It should print out all the variables values that are being used: i and dy. Re: Breakout help Programming Software Development by Viped I am not sure what you mean by "i and dy". I have launch.java which is used to execute the code. It is just simple class extended from JFrame. How about those angles? By those I mean example if ball hits on the right side of the paddle ball will bounce more horizontally. Am I clear what I want? English may not be one of my best skills. Re: Breakout help Programming Software Development by NormR1 > I am not sure what you mean by "i and dy". The following code uses the variables: i & dy. Their values should be printed for debugging: bricks[i].setDestroyed(true); System.out.println("Brick destroyed! i="+i + ", dy="+dy); dy*=-1; > if … Re: Breakout help Programming Software Development by Viped I have changed the code little bit here is modified code for Board.java package net.viped; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.util.… Re: Breakout help Programming Software Development by NormR1 > where you want the debug info When you wrote the code you expected the variables to have certain values and for their values to change in a certain way. Debugging the code means that you should print out the values of the variables as their values change and as their values are used to control the program flow. The printed output will then … Re: Breakout help Programming Software Development by Viped Yeah I meant from which line I should get the debug info and the problem I had earlier, the one with bricks arent destroyed, well now they are destroyed but the ball just goes straight through them. Some of them. Could you execute the code so you know what I mean. Thanks! Re: Breakout help Programming Software Development by NormR1 > from which line I should get the debug info For all variables used in the program. Re: Breakout help Programming Software Development by Viped I think it is not flaw with the code actually. It is when ball hits corner of the brick and it hits another bricks on the same time. How about those angles? Re: Breakout help Programming Software Development by NormR1 I think there could be a flaw in the code. Try adding printlns as I have suggested. What angle are you talking about? Add printlns to the code to print out the values of ball's location and copy and paste the print out here with comments showing what the problem is with where the ball is moving to. Re: Breakout help Programming Software Development by Viped On first hit to bricks the ball destroys three bricks at once, here is balls getBounds() (this is the one you wanted?) java.awt.Rectangle[x=182,y=82,width=10,height=10] java.awt.Rectangle[x=182,y=82,width=10,height=10] java.awt.Rectangle[x=172,y=72,width=10,height=10] And about the angles, the code works as I have coded it. The angle thing is … Re: Breakout help Programming Software Development by NormR1 > I want is that it leaves paddle more right than up that much as it hits right side of the paddle. Are you talking about when the ball hits the ends of the paddle vs hitting the top of the paddle? What does that mean for the values of dx and dy? To the right is +x, up is -y The print outs you posted shows that the position did not change … Re: Breakout help Programming Software Development by Viped Here is the dy:s also printed, those show that it changes direction after hit. So it should move. I think it is just that those 2 bricks are 1 or more px overlapped and it really hits them both. dy before: -2 dy after: 2 ball.getBounds(): java.awt.Rectangle[x=182,y=82,width=10,height=10] dy before: 2 dy after: -2 ball.getBounds(): java.awt.… Re: Breakout help Programming Software Development by NormR1 Your print out does not show where the bricks are. Try putting more items on one line to make it easier to see what is changing from one event/collision to the next. You don't have to print the before AND after for dy. It will always be the opposite sign. > how to determine where the ball hits. Are you looking for the x,y and width,height … Re: Breakout help Programming Software Development by Viped Here is new Board.java and it atleast looks like working, with angles and all. Thanks for your help! package net.viped; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent… SDL Breakout - Jerky ball movement Programming Software Development by pymatio Attached is the start of my Breakout clone, at the moment the ball should just bounce around a couple of times (smoothly) & then quit. But the ball bounces around with varying speeds and with jerky movements, why? control over breakout Programming Software Development by game06 I am trying to create breakout game like this below. http://www.2dplay.com/break-out/… Re: Breakout Ball bouncing physics Programming Game Development by FireNet You use simple vectors. You can rotate vectors with minimal calculations. So when the ball hits the paddle, based on the distance from the center, rotate the directional vector of the ball by a certain amount of degrees. [url]http://chortle.ccsu.edu/VectorLessons/vectorIndex.html[/url] The above link contains a pretty good coverage of vector … Re: Breakout Ball bouncing physics Programming Game Development by CoolGamer48 I didn't have time to read through that yet, but I've heard that distance from center thing before, and I don't necessarily get it. If the paddle isn't moving, the distance from the center of the paddle shouldn't affect the angle of the ball's path of motion (correct me if I'm wrong). And if the paddle is moving, I don't see the distance from the …