Page 1 of 1

The BeepMaster 3035

Posted: Tue Oct 05, 2004 3:27 pm
by DriakTravo
I am in school right now and I made this little fun program. My teacher thinks it is a game lol.

press 1-9 for fun fun fun
Space = Random ;D

Code: Select all

InitKeyboard()
InitSprite()
OpenScreen(800,600,16,"")
DELA = 200
Repeat
  ExamineKeyboard()
  If KeyboardReleased(#PB_Key_E)
    End
  EndIf
  If KeyboardPushed(#PB_Key_1)
    Beep_(1000,5)
    ClearScreen(Random(255),0,0)
  EndIf
  If KeyboardPushed(#PB_Key_2)
    Beep_(2000,5)
    ClearScreen(0,Random(255),0)
  EndIf
  If KeyboardPushed(#PB_Key_3)
    Beep_(3000,5)
    ClearScreen(0,0,Random(255))
  EndIf
  If KeyboardPushed(#PB_Key_4)
    Beep_(4000,5)
    ClearScreen(Random(255),Random(255),0)
  EndIf
  If KeyboardPushed(#PB_Key_5)
    Beep_(5000,5)
    ClearScreen(Random(255),0,Random(255))
  EndIf
  If KeyboardPushed(#PB_Key_6)
    Beep_(6000,5)
    ClearScreen(0,Random(255),Random(255))
  EndIf
  If KeyboardPushed(#PB_Key_7)
    Beep_(7000,5)
    ClearScreen(Random(255),Random(255),Random(255))
  EndIf
  If KeyboardPushed(#PB_Key_8)
    Beep_(8000,5)
    ClearScreen(0,0,0)
  EndIf
  If KeyboardPushed(#PB_Key_9)
    Beep_(9000,5)
    ClearScreen(Random(255),Random(255),Random(255))
  EndIf
  If KeyboardPushed(#PB_Key_Space)
    Beep_(Random(3000)+3000,DELA)
  EndIf
  If KeyboardReleased(#PB_Key_Up)
    DELA + 100
  EndIf
  If KeyboardReleased(#PB_Key_DOWN)
    DELA + 100
  EndIf
  FlipBuffers()
ForEver

Re: The BeepMaster 3035

Posted: Tue Oct 05, 2004 8:36 pm
by PB
I didn't read the code and couldn't quit it at first... it's the E key. Why not Esc?

It kind of reminds me of the C64 when loading a game from cassette. :)

Fred: I noticed that if I hit Shift+Control+Escape while this is running, and then
returned to it, that the window frame becomes visible (it's not visible at first)...

Posted: Tue Oct 05, 2004 9:08 pm
by DriakTravo
Oops! I forgot to post that. my bad :oops: