The BeepMaster 3035

For everything that's not in any way related to PureBasic. General chat etc...
DriakTravo
Enthusiast
Enthusiast
Posts: 346
Joined: Fri Oct 10, 2003 12:42 am
Location: Tampa,FL,USA
Contact:

The BeepMaster 3035

Post 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
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: The BeepMaster 3035

Post 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)...
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
DriakTravo
Enthusiast
Enthusiast
Posts: 346
Joined: Fri Oct 10, 2003 12:42 am
Location: Tampa,FL,USA
Contact:

Post by DriakTravo »

Oops! I forgot to post that. my bad :oops:
Post Reply