This is similar to my "Click The Button Game", except every time you click the button, a new enemy button appears that you can't click. It starts out with 1 enemy. I increased the time to 5 minutes (300 seconds) and it gives you 5 Lives. The hardest thing about this game is trying to find the button that says, "Click". The other buttons say, "Don't". Have fun!
My score was 40 so far.
Thank you to SquirrelMonkey for the idea of having a button to not click and B+ for that midnight timer fix on my last game.
My score was 40 so far.
Thank you to SquirrelMonkey for the idea of having a button to not click and B+ for that midnight timer fix on my last game.
Code: (Select All)
'Find The Button Game by SierraKen
'March 31, 2025
'Thank you to SquirrelMonkey for the idea of adding buttons to not press.
'Thank you B+ for the Timer Midnight Fix.
Dim buttonx3(500), buttony3(500), buttonx4(500), buttony4(500), dir2(500), c2(500), changedir2(500), text2$(500)
Screen _NewImage(800, 600, 32)
begin:
seconds = 300
score = 0
speed = 0
buttonx = 370
buttony = 300
buttonx3 = 100
buttony3 = 100
Lives = 5
text$ = "Click"
_Title "Find The Button Game by SierraKen"
dir = 1
t = Timer
b = 1
text2$(b) = "Don't"
Do
_Limit 100 + speed
buttonx2 = buttonx + 100
buttony2 = buttony + 50
If t > Timer Then t = t - 86400 'Thank you Bplus for this Timer Midnight Fix Problem!
ti = Timer - t
c = 10
For bb = 0 To 30
c = c + 10
Line (buttonx + bb, buttony + bb)-(buttonx2 - bb, buttony2 - bb), _RGB32(100 + c, 100 + c, 100 + c), B
Next bb
Color _RGB32(0, 0, 0), _RGB32(255, 255, 255)
_PrintString (buttonx + 32, buttony + 17), text$
For e = 1 To b
buttonx4(e) = buttonx3(e) + 100
buttony4(e) = buttony3(e) + 50
c2(e) = 10
For bb = 0 To 30
c2(e) = c2(e) + 10
Line (buttonx3(e) + bb, buttony3(e) + bb)-(buttonx4(e) - bb, buttony4(e) - bb), _RGB32(100 + c2(e), 100 + c2(e), 100 + c2(e)), B
Next bb
Color _RGB32(0, 0, 0), _RGB32(255, 255, 255)
_PrintString (buttonx3(e) + 32, buttony3(e) + 17), text2$(e)
Next e
Color _RGB32(255, 255, 255), _RGB32(0, 0, 0)
Locate 1, 1: Print "Score: "; score
Locate 2, 1: Print "Lives: "; Lives
Locate 3, 1: Print "Time Left: "; Int(seconds - ti)
If Int(seconds - ti) < 1 Then
Locate 20, 50
Print "Game Over"
Locate 24, 50
Input "Again (Y/N)"; ag$
If Left$(ag$, 1) = "y" Or Left$(ag$, 1) = "Y" Then GoTo begin:
End
End If
While _MouseInput: Wend
mousex = _MouseX
mousey = _MouseY
mouseLeftButton = _MouseButton(1)
If mouseLeftButton Then
Clear_MB 1
If mousex > buttonx And mousex < buttonx2 And mousey > buttony And mousey < buttony2 Then
c = 110
_AutoDisplay
For bb = 0 To 30
c = c - 10
Line (buttonx + bb, buttony + bb)-(buttonx2 - bb, buttony2 - bb), _RGB32(100 + c, 100 + c, 100 + c), B
Next bb
_Delay .1
For bb = 0 To 30
c = c + 10
Line (buttonx + bb, buttony + bb)-(buttonx2 - bb, buttony2 - bb), _RGB32(100 + c, 100 + c, 100 + c), B
Next bb
_Delay .05
c = 10
For bb = 0 To 30
c = c + 10
Line (buttonx + bb, buttony + bb)-(buttonx2 - bb, buttony2 - bb), _RGB32(100 + c, 100 + c, 100 + c), B
Next bb
_Delay .1
Color _RGB32(0, 0, 0), _RGB32(255, 255, 255)
_PrintString (buttonx + 32, buttony + 17), text$
Sound 900, 1, , , 6
score = score + 1
Color _RGB32(255, 255, 255), _RGB32(0, 0, 0)
Locate 1, 1: Print "Score: "; score
Locate 2, 1: Print "Lives: "; Lives
buttonx = Int(Rnd * 650) + 49
buttony = Int(Rnd * 500) + 19
speed = speed + 1
If speed > 500 Then speed = 500
b = b + 1
If b > 500 Then b = 500
text2$(b) = "Don't"
End If
End If
For e = 1 To b
If mouseLeftButton Then
Clear_MB 1
If mousex > buttonx3(e) And mousex < buttonx4(e) And mousey > buttony3(e) And mousey < buttony4(e) Then
c2(e) = 110
_AutoDisplay
For bb = 0 To 30
c2(e) = c2(e) - 10
Line (buttonx3(e) + bb, buttony3(e) + bb)-(buttonx4(e) - bb, buttony4(e) - bb), _RGB32(100 + c2(e), 100 + c2(e), 100 + c2(e)), B
Next bb
_Delay .1
For bb = 0 To 30
c2(e) = c2(e) + 10
Line (buttonx3(e) + bb, buttony3(e) + bb)-(buttonx4(e) - bb, buttony4(e) - bb), _RGB32(100 + c2(e), 100 + c2(e), 100 + c2(e)), B
Next bb
_Delay .05
c = 10
For bb = 0 To 30
c2 = c2 + 10
Line (buttonx3(e) + bb, buttony3(e) + bb)-(buttonx4(e) - bb, buttony4(e) - bb), _RGB32(100 + c2(e), 100 + c2(e), 100 + c2(e)), B
Next bb
_Delay .1
Color _RGB32(0, 0, 0), _RGB32(255, 255, 255)
_PrintString (buttonx3(e) + 32, buttony3(e) + 17), text2$(e)
Sound 900, 1, , , 4
Lives = Lives - 1
Color _RGB32(255, 255, 255), _RGB32(0, 0, 0)
Locate 1, 1: Print "Lives: "; Lives
If Lives = 0 Then
Locate 30, 30: Print "G a m e O v e r"
Locate 33, 30: Input "Again (Y/N)"; ag$
If Left$(ag$, 1) = "y" Or Left$(ag$, 1) = "Y" Then GoTo begin
End
End If
buttonx3(e) = Int(Rnd * 650) + 49
buttony3(e) = Int(Rnd * 500) + 19
End If
End If
changedir2(e) = Int(Rnd * 100) + 1
If changedir2(e) > 98 Then
dir2(e) = Int(Rnd * 8) + 1
End If
If dir2(e) = 1 Then buttony3(e) = buttony3(e) + 1
If dir2(e) = 2 Then buttony3(e) = buttony3(e) - 1
If dir2(e) = 3 Then buttonx3(e) = buttonx3(e) + 1
If dir2(e) = 4 Then buttonx3(e) = buttonx3(e) - 1
If dir2(e) = 5 Then buttony3(e) = buttony3(e) + 1: buttonx3(e) = buttonx3(e) + 1
If dir2(e) = 6 Then buttony3(e) = buttony3(e) - 1: buttonx3(e) = buttonx3(e) - 1
If dir2(e) = 7 Then buttonx3(e) = buttonx3(e) + 1: buttony3(e) = buttony3(e) + 1
If dir2(e) = 8 Then buttonx3(e) = buttonx3(e) - 1: buttony3(e) = buttony3(e) - 1
If buttonx3(e) > 700 And dir2(e) = 3 Then dir2(e) = 4
If buttonx3(e) > 700 And dir2(e) = 7 Then dir2(e) = 8
If buttonx3(e) < 50 And dir2(e) = 4 Then dir2(e) = 3
If buttonx3(e) < 50 And dir2(e) = 8 Then dir2(e) = 7
If buttony3(e) > 520 And dir2(e) = 1 Then dir2(e) = 2
If buttony3(e) > 520 And dir2(e) = 5 Then dir2(e) = 6
If buttony3(e) < 50 And dir2(e) = 2 Then dir2(e) = 1
If buttony3(e) < 50 And dir2(e) = 8 Then dir2(e) = 7
Next e
changedir = Int(Rnd * 100) + 1
If changedir > 95 Then
dir = Int(Rnd * 8) + 1
End If
If dir = 1 Then buttony = buttony + 1
If dir = 2 Then buttony = buttony - 1
If dir = 3 Then buttonx = buttonx + 1
If dir = 4 Then buttonx = buttonx - 1
If dir = 5 Then buttony = buttony + 1: buttonx = buttonx + 1
If dir = 6 Then buttony = buttony - 1: buttonx = buttonx - 1
If dir = 7 Then buttonx = buttonx + 1: buttony = buttony + 1
If dir = 8 Then buttonx = buttonx - 1: buttony = buttony - 1
If buttonx > 700 And dir = 3 Then dir = 4
If buttonx > 700 And dir = 7 Then dir = 8
If buttonx < 50 And dir = 4 Then dir = 3
If buttonx < 50 And dir = 8 Then dir = 7
If buttony > 520 And dir = 1 Then dir = 2
If buttony > 520 And dir = 5 Then dir = 6
If buttony < 50 And dir = 2 Then dir = 1
If buttony < 50 And dir = 8 Then dir = 7
_Display
Cls , _RGB32(0, 0, 0)
Loop Until InKey$ = Chr$(27)
Sub Clear_MB (var As Integer)
Do Until Not _MouseButton(var)
While _MouseInput: Wend
Loop
End Sub 'Clear_MB