Skip to main content
GameDev.net gamedev.net
🔒 Locked

QBasic Iso program

Started by ShotgunNinja Mar 5, 2007 at 1:56 PM 0 replies 1.7k views
Original Post
ShotgunNinja
ShotgunNinja
I made a Qbasic program for making simple cubes in isometric (or at least in ortho, but it looks like iso). Here it is: 0 : CLS PRINT " Box Draw " PRINT "************************" PRINT " Please enter length: " INPUT L# PRINT " Please enter width: " INPUT W# PRINT " Please enter depth: " INPUT D# PRINT " Clear or not? (1/0) " INPUT C# CLS PRINT " Loading... " SLEEP 1 V# = L# * W# * D# D# = D# * .6 SCREEN 7 P# = 100 - (L# / 2) PSET (P#, P#) PSET (P# - L#, P#) PSET (P# - L#, P# - W#) PSET (P#, P# - W#) A# = L# * .5 B# = INT(SQR((D# * D#) - (A# * A#))) PSET (P# - L# - A#, P# - B#) PSET (P# - L# - A#, P# - W# - B#) PSET (P# - A#, P# - W# - B#) LINE (P#, P#)-(P#, P# - W#) LINE (P#, P#)-(P# - L#, P#) LINE (P# - L#, P#)-(P# - L#, P# - W#) LINE (P#, P# - W#)-(P# - L#, P# - W#) LINE (P# - L#, P#)-(P# - L# - A#, P# - B#) LINE (P#, P# - W#)-(P# - A#, P# - W# - B#) LINE (P# - L#, P# - W#)-(P# - L# - A#, P# - W# - B#) LINE (P# - L# - A#, P# - B#)-(P# - L# - A#, P# - W# - B#) LINE (P# - A#, P# - W# - B#)-(P# - L# - A#, P# - W# - B#) IF C# = 1 THEN GOTO 2 ELSEIF C# = 0 THEN GOTO 1 ELSE GOTO 0 END IF 1 : PSET (P# - A#, P# - B#) LINE (P#, P#)-(P# - A#, P# - B#) LINE (P# - A#, P# - B#)-(P# - L# - A#, P# - B#) LINE (P# - A#, P# - B#)-(P# - A#, P# - W# - B#) 2 : PRINT "Volume:"; V# END Try it! EDIT: Whoops, there's a bug. Sorry...
JasonR
JasonR
God I love qbasic. There's not a better language made.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.