
-----------------------------------
Misha
Fri Dec 23, 2005 10:14 am

game help
-----------------------------------
hi i'm making a game called javanoid. if u never played it before u could try it out at 
Function StickyBallDead(KeyAscii As Integer)
    If KeyAscii = 97 And dead = True Then
        paddle1.Move paddle1.Left - 200     'moves paddle left
        ball1.Move ball1.Left - 400
    ElseIf KeyAscii = 100 And dead = True Then
        paddle1.Move paddle1.Left + 200     'moves paddle right
        ball1.Move ball1.Left + 400
    End If
End Function


this works only when u die but not at the beginning when the form loads.

i also have one more problem. to check if the ball hit the bricks i made a control array and put the coordinates of each one to see that if the ball hits between those coordinates than make the brick disappear. the problem with that is i made the ball measure from its radius so if the ball hits at the very corner of the brick the brick want disappear because it didn't touch the balls radius. is there any other way i could do it like in turing u use wat dot colour.

-----------------------------------
pavol
Thu Dec 29, 2005 7:24 pm


-----------------------------------
when you check for your collisions specify also something like this: if ballx + ballradius > brickx -brickradius and ballx + ballradius < brickx + brickradius then
do whatever
this should check that if the corner of the ball is anywhere in the brick it'll do something, so it shouldn't just skim the brick and miss it

-----------------------------------
Misha
Fri Dec 30, 2005 12:05 pm


-----------------------------------
i have the exact same thing and it works except when the ball hits the corner of the block because u r stating that if the balls radius touches the corner of the block. this is the code i have


If (ball1.Top - 202 >= (block(0).Top - 495) And ball1.Top - 202 = block(0).Left And ball1.Left + 202 = (block(1).Top - 495) And ball1.Top - 202 = block(1).Left And ball1.Left + 202 = (block(2).Top - 495) And ball1.Top - 202 = block(2).Left And ball1.Left + 202 = (block(3).Top - 495) And ball1.Top - 202 = block(3).Left And ball1.Left + 202 = (block(4).Top - 495) And ball1.Top - 202 = block(4).Left And ball1.Left + 202 = (block(5).Top - 495) And ball1.Top - 202 = block(5).Left And ball1.Left + 202 = (block(6).Top - 495) And ball1.Top - 202 = block(6).Left And ball1.Left + 202 = (block(7).Top - 495) And ball1.Top - 202 = block(7).Left And ball1.Left + 202 = (block(8).Top - 495) And ball1.Top - 202 = block(8).Left And ball1.Left + 202 = (block(9).Top - 495) And ball1.Top - 202 = block(9).Left And ball1.Left + 202 