QB / QB64 Discussion Forum      Other Subforums, Links and Downloads
 

 Return to Index  

Make the user draw it himself

April 26 2008 at 7:13 PM
  (Login Mikrondel)
Moderator


Response to Fun challenge - 'Hello World'

 

CONST r = 8
CONST c = 10

SCREEN 13

COLOR 15
LOCATE 3, 3
PRINT "Press space to colour the highlighted"
LOCATE , 3
PRINT "pixel. Miss five times in a row and"
LOCATE , 3
PRINT "you have to start again!"

PALETTE 1, 65793 * 31
PALETTE 2, 0
PALETTE 3, 65793 * 63
PALETTE 4, 256 * 40 + 10
PALETTE 5, 257 * 40
COLOR 2
LOCATE r + 1, c + 1
PRINT "HELLO WORLD"

LINE (c * 8 - 2, r * 8 - 2)-STEP(3 + 8 * 11, 3 + 8), 15, B

DO
FOR Y = r * 8 TO r * 8 + 7
FOR X = c * 8 TO c * 8 + 8 * 11 - 1
I = POINT(X, Y)
PSET (X, Y), I + 1
WAIT &H3DA, 8, 8
WAIT &H3DA, 8
IF I > 0 THEN
WAIT &H3DA, 8, 8
WAIT &H3DA, 8
END IF
K$ = INKEY$
IF K$ = CHR$(27) THEN
SYSTEM
ELSEIF K$ = " " THEN
IF I = 0 THEN
Bad = Bad + 1
IF Bad = 5 THEN
SOUND 134, 15
Bad = 0
LOCATE r + 1, c + 1
PRINT "HELLO WORLD"
ELSE
SOUND 156, 2
SOUND 101, 5
END IF
ELSEIF I = 2 THEN
SOUND 120, 2
SOUND 160, 2
Bad = 0
I = 4
ELSE
Bad = 0
END IF
END IF
PSET (X, Y), I
NEXT
NEXT
LOOP


 
 Respond to this message   
Responses

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement