View Single Post
Old 03-24-2009, 09:59 AM   PM User | #2
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
Well I would check your code at

Code:
	if(ball._x < 0) {
		oppScore++;
		
		ball._x = opp._x - 60;
		ball._y = opp_y;
		ball.dy = 0;
	}
because it doesn't reset the ball properly.

Then the ball doesn't really have any angle to its direction, so perhaps integrating some Math methods to give the ball a different direction based on where it hits the paddle.
__________________
jeremy - gnomeontherun
Educated questions often get educated answers, and simple questions often get simple answers.
gnomeontherun is offline   Reply With Quote