Your very first program

This is the very first full program I ever wrote. It’s a QBasic RPG battle with ASCII art.

:proud: Paste your first program if you can find it.


'work started on July/09/01

'Starting HP
HP1 = 10    'Artimus
HP2 = 10    'Maximus
Hp3 = 20    'Enemy

begin:

CLS

'Note this long method of programming. I was originaly going to make the
'characters move but found that too troublesome.

'This is the graphic of Artimus a main fighter
ArtimusGraphic:
LET one1$ = ".":   LET four1$ = ".":  LET one4$ = ".":   LET one5$ = "."
LET four4$ = ".":  LET four5$ = ".":  LET two1$ = "(":   LET three1$ = ")"
LET one2$ = "-":   LET two2$ = "\":   LET three2$ = "/": LET four2$ = "-"
LET one3$ = "/":   LET two3$ = "-":   LET three3$ = "-": LET four3$ = "\"
LET two4$ = "|":   LET three4$ = "|": LET two5$ = "o":   LET three5$ = "o"
LET Xaxis = 25:    LET Yaxis = 3
'This signifies that Maximus needs to be drawn next
LET WhatNext$ = "Maximus"
GOTO DrawOut

'This is the graphic of Maximus, the partner of Artimus
MaximusGraphic:
COLOR 3
LET one1$ = ".":   LET four1$ = ".":  LET one4$ = ".":   LET one5$ = "."
LET four4$ = ".":  LET four5$ = ".":  LET two1$ = "{":   LET three1$ = "}"
LET one2$ = "-":   LET two2$ = "\":   LET three2$ = "/": LET four2$ = "-"
LET one3$ = "/":   LET two3$ = "-":   LET three3$ = "-": LET four3$ = "\"
LET two4$ = "|":   LET three4$ = "|": LET two5$ = "O":   LET three5$ = "O"
LET Xaxis = 25:    LET Yaxis = 18
'This signifies that the next character to be drawn is the enemy
LET WhatNext$ = "Enemy"
GOTO DrawOut

'This is the graphic of the enemy, which will be fought
EnemyGraphic:
COLOR 4
LET one1$ = "\":   LET four1$ = "/":  LET one4$ = ".":   LET one5$ = "."
LET four4$ = ".":  LET four5$ = ".":  LET two1$ = ".":   LET three1$ = "."
LET one2$ = ".":   LET two2$ = "(":   LET three2$ = ")": LET four2$ = "."
LET one3$ = "-":   LET two3$ = "\":   LET three3$ = "/": LET four3$ = "-"
LET two4$ = "|":   LET three4$ = "|": LET two5$ = "O":   LET three5$ = "O"
LET Xaxis = 2:    LET Yaxis = 10
'This signifies that the fight is ready
LET WhatNext$ = "StartFight"
GOTO DrawOut

DrawOut:
'line one
LOCATE Yaxis, Xaxis: PRINT one1$ + two1$ + three1$ + four1$
'linetwo
LOCATE Yaxis + 1, Xaxis: PRINT one2$ + two2$ + three2$ + four2$
'line three
LOCATE Yaxis + 2, Xaxis: PRINT one3$ + two3$ + three3$ + four3$
'line four
LOCATE Yaxis + 3, Xaxis: PRINT one4$ + two4$ + three4$ + four4$
'line five
LOCATE Yaxis + 4, Xaxis: PRINT one5$ + two5$ + three5$ + four5$

'this loop control tells what graphic should be drawn next
IF WhatNext$ = "Enemy" THEN GOTO EnemyGraphic
IF WhatNext$ = "Maximus" THEN GOTO MaximusGraphic
IF WhatNext$ = "StartFight" THEN GOTO HPdisplay

'this will display the current HPs
HPdisplay:
COLOR 15
LOCATE 8, 24: PRINT "ARTIMUS"
LOCATE 9, 24: PRINT HP1; "/10"
LOCATE 23, 24: PRINT "MAXIMUS"
LOCATE 24, 24: PRINT HP2; "/10"
LOCATE 14, 2: PRINT "ENEMY"
LOCATE 15, 1: PRINT Hp3; "/20"

'outcomes of the battle
IF Hp3 = 0 THEN GOTO Won
IF HP1 AND HP2 = 0 THEN GOTO lost

'who shall go have their turn next:
IF WhoNext$ = "Artimus" THEN GOTO ArtimusTurn
IF WhoNext$ = "Maximus" THEN GOTO MaximusTurn
IF WhoNext$ = "Enemy" THEN GOTO EnemyTurn

'Artimus's Turn
ArtimusTurn:
                              
LET WhoNext$ = "Maximus"

LOCATE 10, 47: PRINT "Artimus's Turn"
LOCATE 11, 47: PRINT "______________"
LOCATE 12, 47: PRINT "  1.) ATTACK"
LOCATE 13, 47: PRINT "  2.) HEAL"

DO
LET oneORtwo$ = INKEY$
 IF oneORtwo$ = CHR$(49) THEN   'If 1 is pressed
  SOUND 70, 3                   'this is a sound sample
  LET Hp3 = Hp3 - 5
  GOTO begin
 END IF
 IF oneORtwo$ = CHR$(50) THEN   'if 2 is pressed
   FOR recover = 90 TO 100      'this is a sound sample
    SOUND recover, 2
   NEXT recover
  LET HP1 = HP1 + 5
  IF HP1 > 10 THEN LET HP1 = 10
  GOTO begin
 END IF
LOOP

'Maximus's Turn
MaximusTurn:

LET WhoNext$ = "Enemy"

LOCATE 10, 47: PRINT "Maximus's Turn"
LOCATE 11, 47: PRINT "______________"
LOCATE 12, 47: PRINT "  1.) ATTACK"
LOCATE 13, 47: PRINT "  2.) HEAL"

DO