Weekly Qbasic and Qb64 Lesson Topics
April 25, 2025, 11:00:47 pm
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Want to see a specific Tutorial? ASK!
 
  Home Help Search Arcade Links Staff List Login Register  

PacMan2f This one moves with arrow keys

Pages: 1 [2] 3 4
  Print  
Author Topic: PacMan2f This one moves with arrow keys  (Read 4363 times)
guest
Guest
« Reply #15 on: March 08, 2011, 01:53:10 am »


Code:
REM
DEFLNG A-Z

CHDIR "c:\windows\media\" 'xp files reside here or put file in qb64 main folder
mid1& = _SNDOPEN("hi_hat.mid", "vol")
_SNDVOL mid1&, 0.7

SCREEN 12

DO
  _LIMIT 100
  x1 = INT(RND * 600) + 20
  y1 = INT(RND * 400) + 20
  r = INT(RND * 10) + 1
  tint = INT(RND * 15) + 1
  PSET (x1, y1), tint
  CIRCLE (x1, y1), r, tint
  IF NOT _SNDPLAYING(mid1&) THEN
    _SNDPLAY mid1&
  END IF
  IF _KEYDOWN(27) THEN
    EXIT DO
  END IF
  _DISPLAY
LOOP
_SNDSTOP mid1&
_SNDCLOSE mid1&
SLEEP
SYSTEM
« Last Edit: September 17, 2011, 09:46:40 am by GarrisonRicketson » Report Spam   Logged

Pages: 1 [2] 3 4
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum


Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy