Here is my entry:
Const autoplay = 0 Graphics 800, 600, 0, 2 SetBuffer BackBuffer() HidePointer() Level = 1 Type Ball Field x, y Field dx, dy End Type Type Obstacle Field x, y Field w, h Field dx, dy Field sm End Type b.Ball = New Ball b\x = 0 b\y = 0 b\dx = 5 b\dy = 5 batx = 400 baty = 550 Message("Level 1 - Use mouse") starttime = MilliSecs() score = 0 OL = 1 Repeat Repeat ok = MilliSecs() Delay 1 Until (ok - old) > 10 old = ok Level = ((Score + 7) / 13) + 1 If Level > OL Then OL = Level Select Level Case 11 Message("Congrats! End of game, and you won!") End Case 10 Message("Level 10 - Obstacles! (Final round)") oz = 0 For b.Ball = Each Ball b\x = oz * 80 b\y = -oz * 75 b\dx = 4 + oz/3 b\dy = 4 + oz/3 oz = oz + 3 Next For c = 0 To 15 o.Obstacle = New Obstacle o\sm = 7 o\sm = 1 o\x = Rand(800) o\y = Rand(400) o\w = Rand(25, 50) o\h = Rand(12, 30) Next Case 9 Message("Level 9 - Various speeds!") oz = 0 For b.Ball = Each Ball b\x = oz * 80 b\y = -oz * 75 b\dx = 2 + oz/3 b\dy = 2 + oz/3 oz = oz + 3 Next Case 8 Message("Level 8 - MultiBall!") Delete Each Obstacle Delete Each Ball For oz = 0 To 10 Step 3 b.Ball = New Ball b\x = oz * 80 b\y = -oz * 75 b\dx = 4 b\dy = 4 Next Case 7 Message("Level 7 - Obstacles Faster!") For o.Obstacle = Each Obstacle o\sm = 7 Next Delete Last ball b.Ball = First Ball b\x =0 b\y = 0 Case 6 Message("Level 6 - Obstacles Again!") b.Ball = First Ball b\x = 0 b\y = 0 b = After b b\x = 800 b\y = 0 For c = 0 To 15 o.Obstacle = New Obstacle o\sm = 1 o\x = Rand(800) o\y = Rand(400) o\w = Rand(25, 50) o\h = Rand(12, 30) Next Case 5 Delete Each Obstacle Message("Level 5 - New Ball!") b.Ball = New Ball b\x = 0 b\y = 0 b\dx = 5 b\dy = 5 Case 4 Message("Level 4 - Faster!") b.Ball = First Ball b\dx = 8 b\dy = 8 Case 3 Message("Level 3 - Obstacles!") Delete Last Ball b.Ball = First Ball b\x = 0 b\y = 0 For c = 0 To 15 o.Obstacle = New Obstacle o\sm = 1 o\x = Rand(800) o\y = Rand(400) o\w = Rand(25, 50) o\h = Rand(12, 30) Next Case 2 Message("Level 2 - New Ball!") b.Ball = New Ball b\x = 0 b\y = 0 b\dx = 5 b\dy = 5 End Select End If Cls Text 200, 10, "Level:" + Level, 1, 0 Text 600, 10, "Score:" + Score, 1, 0 For b.Ball = Each Ball b\x = b\x + b\dx b\y = b\y + b\dy If b\x <= 0 Then b\dx = Abs(b\dx) If b\x >= 799 Then b\dx = -Abs(b\dx) If b\y <= 0 Then b\dy = Abs(b\dy) If b\y >= 599 Then b\dy = -Abs(b\dy) hit = hit + 1 If hit > 2 Then Tease: hit = 0 Else Alarm() End If End If Oval b\x - 12, b\y - 12, 25, 25 For o.Obstacle = Each Obstacle If RectsOverlap(b\x - 12, b\y - 12, 25, 25, o\x, o\y, o\w, 1) Then b\dy = -Abs(b\dy) If RectsOverlap(b\x - 12, b\y - 12, 25, 25, o\x, o\y + o\h - 1, o\w, 1) Then b\dy = Abs(b\dy) If RectsOverlap(b\x - 12, b\y - 12, 25, 25, o\x, o\y, 1, o\h) Then b\dx = -Abs(b\dy) If RectsOverlap(b\x - 12, b\y - 12, 25, 25, o\x + o\w - 1, o\y, 1, o\h) Then b\dx = Abs(b\dy) Next If RectsOverlap(batx - 50, baty, 100, 4, b\x - 12, b\y - 12, 25, 25) Then If ttest = 0 Then b\dy = -Abs(b\dy): Score = Score + 1: ttest = 1 Else ttest = 0 End If If RectsOverlap(batx - 50, baty + 20, 100, 4, b\x - 12, b\y - 12, 25, 25) Then b\dy = Abs(b\dy) If RectsOverlap(batx - 50, baty, 1, 24, b\x - 12, b\y - 12, 25, 25) Then b\dx = -Abs(b\dx) If RectsOverlap(batx + 49, baty, 1, 24, b\x - 12, b\y - 12, 25, 25) Then b\dx = Abs(b\dx) Next batx = batx + MouseXSpeed() If autoplay Then miny = 0 For b.Ball = Each Ball If b\y > miny Then miny = b\y aimx = b\x End If Next spd = Abs(aimx - batx) If spd > 15 Then spd = 15 If miny > baty + 24 Then batx = batx - 15 Else batx = batx + Sgn(aimx - batx) * spd End If End If If batx < 50 Then batx = 50 If batx > 750 Then batx = 750 MoveMouse 400, 300 Rect batx - 50, baty, 100, 24 For o.Obstacle = Each Obstacle Rect o\x, o\y, o\w, o\h o\x = o\x + (o\dx *o\sm) If o\x < 0 Then o\x = o\x + 800 If o\x > 800 Then o\x = o\x - 800 If Rand(25) = 1 Then o\dx = Rand(-1, 1) Next Flip Until KeyHit(1) End Function Message(s$) SetBuffer FrontBuffer() Color 0, 0, 0 For x = -3 To 3 For y = -3 To 3 Text 400 + x, 300 + y, s$, 1, 1 Next Next Color 255, 255, 255 Text 400, 300, s$, 1, 1 Delay 1750 SetBuffer BackBuffer() End Function Function Tease() Restore For g = 1 To Rand(10) Read t$ Next Message(t$) End Function Data "What's the matter ? Going too fast ?" Data "Come on, play like a man!" Data "Hey ! Wake up .." Data "Let's call it a day, okay ?" Data "Man .. even I could do better than this" Data "This is Pong! It is supposed to be an easy game.." Data "Ow ow .. now where's that turbo button" Data "Ehm .. you're supposed to bounce that white round thingie with the mouse" Data "Oh look ! You're a real champion" Data "Right.. but at least you're good with sports, right ?" Function Alarm() For i = 0 To 10 ClsColor 0, 0, (i Mod 2) * 255 Cls Flip Delay 5 Next End Function