Hi, I was wondering how to convert an old QB program into B3D, because right now, B3D appears to be the form of the language of choice for me when it comes to BASIC. However, looking at programs in hindsight, I'd like to bring a program back to life, but trying to find equivalent code for B3D can be a nightmare. Here's the old QB code below:
SCREEN 12
CLS
RANDOMIZE TIMER
FOR dots = 1 TO 2000
colr = INT(RND*16)
col = INT(RND*480)
row = INT(RND*640)
PSET (col, row), colr
NEXT dots
FOR cnt = 1 to 60
centerCol = INT(RND*639) + 1
centerRow = INT(RND*479) + 1
radius = INT(RND*100) + 1
CIRCLE (centerCol, centerRow), radius
NEXT cnt
COLOR 12
LOCATE 12, 34
PRINT "Space FX v1.0"
LOCATE 13, 28
PRINT "(c)2005, Robert A. Morin"
FOR i = 1 TO 35
freq = INT(RND*2700) + 500
dur = INT(RND*3) + 1
SOUND freq, dur
NEXT i
FOR freq = 800 to 400 STEP -7
SOUND freq, 1
SOUND 900 - freq, 1
NEXT freq
COLOR 10
LOCATE 25, 1
INPUT "Press <ENTER> to Quit Demo: ", ent$
END
I was wondering how to convert this into the Blitz 3D environment, since I know that QBasic's code structure is far different, since QB was DOS-based, and used the PC Speaker, which Windows doesn't do, obviously, and this code is well over 10 years old.
SCREEN 12
CLS
RANDOMIZE TIMER
FOR dots = 1 TO 2000
colr = INT(RND*16)
col = INT(RND*480)
row = INT(RND*640)
PSET (col, row), colr
NEXT dots
FOR cnt = 1 to 60
centerCol = INT(RND*639) + 1
centerRow = INT(RND*479) + 1
radius = INT(RND*100) + 1
CIRCLE (centerCol, centerRow), radius
NEXT cnt
COLOR 12
LOCATE 12, 34
PRINT "Space FX v1.0"
LOCATE 13, 28
PRINT "(c)2005, Robert A. Morin"
FOR i = 1 TO 35
freq = INT(RND*2700) + 500
dur = INT(RND*3) + 1
SOUND freq, dur
NEXT i
FOR freq = 800 to 400 STEP -7
SOUND freq, 1
SOUND 900 - freq, 1
NEXT freq
COLOR 10
LOCATE 25, 1
INPUT "Press <ENTER> to Quit Demo: ", ent$
END
I was wondering how to convert this into the Blitz 3D environment, since I know that QBasic's code structure is far different, since QB was DOS-based, and used the PC Speaker, which Windows doesn't do, obviously, and this code is well over 10 years old.