Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Breakout Theory

Author
Message
Giles Papworth
22
Years of Service
User Offline
Joined: 7th Feb 2003
Location: In my own little reality
Posted: 6th Aug 2004 23:47 Edited at: 6th Aug 2004 23:53
As i understand it if an object hits a well at a specific angle, it will rebound off at the same angle that it arrived at, say 30 degrees. Would this not pose a problem with the whole game, being that the ball would always hit the wall / bricks at the same andgle?

OR

Does the ball bounce off at a 90 dgree angle to the all everytime?

Its not a bug, Its a feature

If we were meant to stay in this reality games would not exist!
Code Machine
20
Years of Service
User Offline
Joined: 21st Jul 2004
Location: United Kingdom
Posted: 7th Aug 2004 00:06
Well, an ideal physics problem with no spinning might mean it would come off at the same angle all the time, but when you consider that the ball would spin, plus friction and other things, it's not such a straight-forward problem.

I think I remember in break-out that the angle of reflection off the bat would depend on the position of the bat the ball hit. So, if it hit the bat at the centre, then angle of reflection = angle of incidence, but anywhere else would change the angle. The further to the edge of the bat, the bigger the difference in the angle. I think hitting anything else like the walls and blocks (not sure about block corners) is the same angle.

Sorry for being a little vague, but I'm going to try Breakout myself for the first time soon, and this is how I've been thinking of it.

Code Machine
Giles Papworth
22
Years of Service
User Offline
Joined: 7th Feb 2003
Location: In my own little reality
Posted: 7th Aug 2004 00:22
No problem, i mean i don't have any problem with collision or the general graphics (i think) but it is just the main ball and bat thing that has holted me in my steps really. I want to get past the theory (understand it) and then make the game

Its not a bug, Its a feature

If we were meant to stay in this reality games would not exist!
Giles Papworth
22
Years of Service
User Offline
Joined: 7th Feb 2003
Location: In my own little reality
Posted: 7th Aug 2004 01:21
ANyone else got any ideas?

Its not a bug, Its a feature

If we were meant to stay in this reality games would not exist!
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 7th Aug 2004 01:43
I think that Code Machine is right. The ball bounces at the same angle as it hit the objects. It bounces off the bat in different angles depending on where it hit the bat.

Giles Papworth
22
Years of Service
User Offline
Joined: 7th Feb 2003
Location: In my own little reality
Posted: 7th Aug 2004 01:59
Ok gotcha, so what i could do is create a lower and upper boundry for angles say from 3 to 177 degrees, then divide the length of the paddle by 174 and then i would get the angle it bounces off the bat (unless it is bang on the middle)

Its not a bug, Its a feature

If we were meant to stay in this reality games would not exist!
pizzaman
21
Years of Service
User Offline
Joined: 18th Feb 2004
Location: Gateshead, UK
Posted: 7th Aug 2004 05:24
hi

When I was starting to code, I made a simple pong game and the angles I used for hitting the walls was, the angle hit at was the angle it rebounded at, plus or minus a random number between 0 to 3 to be added (or subtracted), against the rebounded angle to make the ball less predictable and more fun.

pizzaman
Giles Papworth
22
Years of Service
User Offline
Joined: 7th Feb 2003
Location: In my own little reality
Posted: 9th Aug 2004 17:40
Ah good idea

Its not a bug, Its a feature

If we were meant to stay in this reality games would not exist!

Login to post a reply

Server time is: 2025-05-16 12:27:20
Your offset time is: 2025-05-16 12:27:20