Qbasicnews.com

Full Version: My First Game, M.A.G.E
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
When I give it out, I still have the duel hack to finish and yet again more verbs and actions.

Oh, to make a random number in a set amount, do you use

LET e < 10
LET e > 0

Or some command I don't know?

So far I have been using Print, Color, LET, IF THEN ELSE, AND n' OR, and Input.
Code:
e = INT(RND(1) * 10) + 1
will produce a random number between 1 and 10. Modify to your needs. Smile

EDIT: And don't forget to seed the random number generator at the beginning of your program...
Code:
RANDOMIZE TIMER
W00T!

I got a battle hack going in this baby, AND it is pretty sweet AND hard. Not much, but considering that it is my first project, SWEET!
Just one thing don't use the LET command all it does is increase program size. E = 10 is the same as LET E = 10.
A few very old computers required Let. LET is evil avoid it like the plague.
My game is 72 KB.

A picture is 355 KB.

My movies are 15 MB.

I will let LET stay.

Besides, it is a good habit considering that I have been using random numbers for GOTO, and haven't been documenting it.
Let is a useless command does nothing and I really don't unserstand why qbasic even supports it.
I know about legacy but the most popular versions of basic never required it. So few users would have been affected by its ommission and would have opend up another variable name.
Not that with qbasic the need anymore.
Jhang: the use of LET is actually BAD programming practice. It is not supported on modern BASIC compilers, so when you make the transition (you will eventually), you will get confused if you're relying on LET. Just LET it go, man Wink

peace: I have a feeling Agamemnus still uses LET...


j/k Wink
:rotfl:
I think I have only ever used one computer that acutally made LET non-optional(you had to use it). Not a popular version of basic.
I may not use good programming practice but that one just makes sense.
The only time I ever used LET was when transcribing a little BASIC (70's) program from my 1989 algebra book, about 6 years ago....
Wow, there's hope for you yet, Aga Wink
Pages: 1 2 3 4