Hello, i have just started QBasic...i think three days ago ;]
So i have learned main things on basic and, I would like to know how to create text-based games? For example RPG?
I just need main things, how should i start...
Welcome to the World of Qbasic
!
Well here's a simple thing...
Code:
CLS
Print "You are Faced with two doors"
Print "1- Pick the left one"
Print "2- Pick the right one"
Print "Well what is your choice?";
INPUT Choice
IF Choice = 1 THEN
CLS
Print "There was a monster behind there and he ate you..."
END
END IF
IF Choice = 2 THEN
CLS
Print "You opened the door and entered a room."
END IF
Print "There's a opened window..."
Print "1- Look outside"
Print "2- Dance till you can't dance no more =P"
Print "Well what is your choice?";
INPUT Choice
IF Choice = 1 THEN
CLS
Print "You looked out the window and fell out..."
END
END IF
IF Choice = 2 THEN
CLS
Print "You started to dance..."
END IF
And so on... if you don't really understand some of the commands and such just tell me and i'll explain them. You can add so much more to this, just this is a rough example.
hey:]
thanks for care, but this thing i know allready, but for example, hoe to do stats of the hero?I mean HP, strenght and so on:]
I think I want to much for now, but im interested ;]
[/code]
variables
Code:
health = 10
strength = 10
soon = 10
'blahblahblah
PRINT "You found a potion!"
PRINT "1) Drink it"
PRINT "2) Throw it"
INPUT CHOICE
IF CHOICE = 1 THEN
PRINT
PRINT "Your health went up by 5!"
health = helth + 5
ELSE
PRINT
PRINT "You threw it and blah
END IF
OK, thats clear... and the last question....
How to do the fight scenes...
for example you meet an enemy and you fight him (if you want to fight ofcourse:]) If ure stronger and you have more HP u kill him, but u loose your hp (however u get str or exp or smth:]), but if ure weaker u die...
Psuedocode...
Code:
IF YouHitAnEnemy AND YouChooseToFight THEN
IF (YourHP > EnemyHP) AND (YouAreStrongerThanEnemy) THEN
KillEnemy
IncreaseStrength
IncreasePoints
DecreaseHP
ELSE
YouDie
END IF
END IF
Quote:oopsies, WT...... typo!!
me? is it the end quote? *stabs it*