'space code Dim X(100), Y(100), Z(100) As Integer Dim tmpX(100), tmpY(100), tmpZ(100) As Integer Dim K As Integer Dim Zoom As Integer Dim Speed As Integer Private Sub Form_Activate() Speed = -1 K = 2038 Zoom = 256 tmrspace.Interval = 1 For i = 0 To 100 X(i) = Int(Rnd * 1024) - 512 Y(i) = Int(Rnd * 1024) - 512 Z(i) = Int(Rnd * 512) - 256 Next i End Sub Private Sub tmrspace_Timer() For i = 0 To 100 Circle (tmpX(i), tmpY(i)), 5, BackColor Z(i) = Z(i) + Speed If Z(i) > 255 Then Z(i) = -255 If Z(i) < -255 Then Z(i) = 255 tmpZ(i) = Z(i) + Zoom tmpX(i) = (X(i) * K / tmpZ(i)) + (Form1.Width / 2) tmpY(i) = (Y(i) * K / tmpZ(i)) + (Form1.Height / 2) Radius = 1 StarColor = 256 - Z(i) Circle (tmpX(i), tmpY(i)), 5, RGB(StarColor, StarColor, StarColor) Next i End Sub 'end space code 'set the highscores in order If playedscore > score(9) Then Form3.Show Unload Me For i = 0 To 9 If (playedscore > score(i)) Then temp(0) = score(i) score(i) = playedscore playedscore = 0 position = i For j = i To 8 temp(1) = score(j + 1) score(j + 1) = temp(0) temp(0) = temp(1) Next j End If Next i Else Unload Me Form2.Show End If 'end highscores code 'type bat and ball Select Case bat Case Is = 1 imgbat.Picture = bat1 Case Is = 2 imgbat.Picture = bat2 Case Is = 3 imgbat.Picture = bat3 Case Else imgbat.Picture = bat4 End Select 'end bat and ball code goes in form load of level 'code to hit bricks properly If brick(bricks).Visible = True And imgimgball11.Top <= (brick(bricks).Top + brick(bricks).Height) And imgimgball11.Top >= brick(bricks).Top And (imgimgball11.Left + imgimgball11.Width / 2) <= (brick(bricks).Left + brick(bricks).Width) And (imgimgball11.Left + imgimgball11.Width / 2) >= brick(bricks).Left Or brick(bricks).Visible = True And (imgimgball11.Top + imgimgball11.Height) >= brick(bricks).Top And (imgball1.Top + imgball1.Height) <= (brick(bricks).Top + brick(bricks).Height) And (imgball1.Left + imgball1.Width / 2) <= (brick(bricks).Left + brick(bricks).Width) And (imgball1.Left + imgball1.Width / 2) >= brick(bricks).Left Then ydirection stuff End If If brick(bricks).Visible = True And (imgball1.Left + imgball1.Width) >= brick(bricks).Left And (imgball1.Left + imgball1.Width) <= (brick(bricks).Left + brick(bricks).Width) And (imgball1.Top + imgball1.Height / 2) <= (brick(bricks).Top + brick(bricks).Height) And (imgball1.Top + imgball1.Height / 2) >= brick(bricks).Top Or brick(bricks).Visible = True And imgball1.Left <= (brick(bricks).Left + brick(bricks).Width) And imgball1.Left >= brick(bricks).Left And (imgball1.Top + imgball1.Height / 2) <= (brick(bricks).Top + brick(bricks).Height) And (imgball1.Top + imgball1.Height / 2) >= brick(bricks).Top Then xdirection stuff End If 'end code to hit bricks properly