There are a certain number of problems in your program:
- you should use images with the same size as the bitmaps in the program, your ball image size is 135*131 pixels and you sgrink it down to 10*10 pixels.
1 I don't know how to completely despose of bricks hit by the ball.
- you check only the lower brick row for intersections, so you cannot dispose the bricks from the other rows.
Sub CheckIfIntersects
For n = 91 To 100
2 The ball often gives a number of short bounces instead of bounsing off the wall.
you should check also the speed sign when hitting a brick.
3 How to reduce the distance between the bricks?
you can reduce the space between the bricks in changing the values 24 and 12.
Left = Left + 24
Top = Top + 12
In the BuildWall routine there is no need to declare the Drawer
Drawer.New1("Form1",True)
for each brick !
Attached a modified version with quite some chages:
- numeric values replaced by variables
- check of brick height per column
- bricks drawn as rectangles instead of bitmaps and 100 rectangles
- changed player and ball bitmaps
- the ball bounces when hitting the 'playground' border
Best regards.