liberty Basic is a very simple programming language used to teach beginners the basics. It
is slightly based of the origanal BASIC language (Beginners All Purpose Symbolic Instruction Code) but simplified. Lets get
started. First of all you will need liberty basic. go to
http://libertybasic.com and download the free trial.
First of all lets show you a very simple code in Liberty Basic
print "Welcome To My First Game"
the print statement tells the computer to write whatever you put in the quotation marks so it
would appear as-
Welcome To My First Game
Notice that "print" doesnt show up. The computer takes that as a direct order. Its
not in Quotes. Lets get more complicated. Now lets talk about variables. A Variable is a word or letter that stores data.
The data may change according to what you want to do to it. Like in a fighting game, Health would be a variable because when
you get hurt (health = health - damage). So it subtracts damage from health. Get it? Good. Lets move on. To use a variable
in Liberty Basic you would do this-
input "Are you a boy or a girl? "; gender$
The "input statement tells the computer to write somthing and then ask the player for an answer. So it will ask you if
you ae a boy or a girl and then stores whatever you type inside the (gender$) variable. The semicolon is something that you
put there because.... uhhh im not sure how to explain it but thats how you do it. Now
print "Welcome To My First Game. "
input "Are you a boy or a girl? "; gender$
print " You are a "; gender$
Notice the dollar sign? it tells the computer that its a variable. Now what it would do is ask you if you are a boy or
girl and then tell you whatever you put in. For example
Welcome To My First Game.
Are you a boy or a girl? Boy (hit enter)
You are a boy
See that? now if the user had typed in girl it would have said girl. There are limitless possibilities in Text Based
Games.Once I made an extrememly long text adventure with my friend. It was kool. Ok on to strings. Ok onto the if statement.
input "Are you a boy or a girl? "; gender$
if gender$ = "boy" then goto [boy]
goto [girl]
[boy]
print "You
probably like skateboarding. "
end
[girl]
print "You probably like nail polish or whatever ."
end
That was a little more complicated. Study that Coding and see if you can understand the concepts of it. thos [thingy]
things are certain gateways in the program. You can jump to any section using the (goto) command. Notice that [boy] and [girl]
are seperate parts in the program.