![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
Fun with QBASIC! |
Thomas Fjellstrom
Member #476
June 2000
![]() |
0xd00ds and 0xd00dets! I invite you all to a grand Occasion! The Unvailing of my Very First QBASIC program!
I did this in class (while waiting for the teacher to get me my next course) on the DOS 6.22 system I installed I wanted to do a pong clone but I didn't have enough time after figuring out the little bit of the language shown above I'm sure You all say it's lame.. then show me your first QBASIC programs! -- |
Goalie Ca
Member #2,579
July 2002
![]() |
run this There is source code and "compiled" files on my site (see sig) This was some of my "early work" back when i was totally n00b. I don't have my earliest work because that all dissapeared with a format. If you want a real laugh you should download this. It was written by BILL Gates to showcase the power of the original IBM pc and GW-Basic. I also submited this game on behalf of BG ------------- |
Matthew Leverton
Supreme Loser
January 1999
![]() |
For some reason I'm having difficulties uploading, or else I'd link to it... The first program I wrote was almost 10 years ago. (Time flies!!!) I was 12-13 years old, somewhere in that range. Anyway, it was a monopoly game written in QBASIC. I didn't have any programming resources, just the QBASIC help file. No internet. Didn't know anyone who could program. It was frustrating. I actually started it in GW-BASIC, so there are a bunch of line numbers. Then I realised QBASIC came with the PC, and I was ecstatic. Especially once I figured out what SUBs and FUNCTIONs were. IF player$ = a$ THEN dola = dola + 100 Which looking back, I suppose if you give both players the same name that bad things (TM) would happen, heh. |
DanTheKat
Member #1,990
March 2002
![]() |
PRINT "Hello World!"
--- |
Dark
Member #749
November 2000
![]() |
I wrote my first 320x200x256 rpg in qbasic.. had a world editor and everything done... then i saw djgpp/allegro and erased it I'm dumb!
__________________________________ |
Thomas Fjellstrom
Member #476
June 2000
![]() |
heh. If you hold down one of the keys, the dot bounces on the side of the screen -- |
Trumgottist
Member #95
April 2000
![]() |
I wrote the first version of Rocket Duel with QBasic. (Do you think the current RD is hard to play? This is twice as hard. A long game is one that lasts more than a couple of seconds, but we still had a lot of fun with it, my sister and I.) If anyone is interested: http://trumgottist.com/tmp/raket.bas Adjust the "FOR Delay = 1 TO 10000" things in Spela and Spela2 to fit your computer's speed. But at the very first encounter, I didn't know what QBasic was, nor had I any idea what programming was. I found Nibbles on my parent's computers hard drive and messed with it until I understood what it was doing. The first attempt I did was to add a third player. I searched for every occurence of "Sammy" and "Jake" (the names for the snakes) and where I found them together, I added a third name. I didn't work, of course. But eventually I understood what sammy(i) meant... The QBasic help file was very good! -- Play my game: Frasse and the Peas of Kejick |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Id test it.. But I don't have a QBASIC compiler or interereter for Linux.. -- |
Dark
Member #749
November 2000
![]() |
Add a defint A-Z. (Usually makes code run faster.) And if you add the interger symbol after all your ints, it will run even faster. To check keypressed you can use Select Case. I forget how to type it though.. I think SELECT CASE (K1$) CASE IS CHR$(65) xinc = xinc + 1 CASE IS CHR$(66) yinc = yinc + 1 END SELECT
__________________________________ |
Thomas Fjellstrom
Member #476
June 2000
![]() |
hmm. cool. thanks. would you belive that program took me 2 hours? heh. I had to reboot a few times.. Considering I got into a few endless loops that I couldn't figure out how to get out of. ja. the code I posted, is about the limits of my QBASIC knowlege -- |
Dark
Member #749
November 2000
![]() |
I'm not sure why it goes faster. I think it has to do with checking a table of what type your variables are, and if you have the sign, it doesn't need to. An endless loop can be broken with CTRL-C or CTRL-BREAK. if you wanted to access a variable in a sub that was decalred in the main program, use SUB Something() shared var1,var2
__________________________________ |
Thomas Fjellstrom
Member #476
June 2000
![]() |
hmm.. I tried CTRL-C.. that never worked.. Coo. I'll make sure I try CTRL-BREAK next time. -- |
Dark
Member #749
November 2000
![]() |
Does the PC speaker beep if you keep a key held down?
__________________________________ |
Thomas Fjellstrom
Member #476
June 2000
![]() |
ja. but a really dull one like the buffer is full. -- |
Dark
Member #749
November 2000
![]() |
use k1$ = inkey$ at the top before you check it's value, then after those lines, set it to k1$ = "" will keep it empty and stop the beeps. (IIRC)
__________________________________ |
Thomas Fjellstrom
Member #476
June 2000
![]() |
doh. I meant when in an endless loop, in that code, no it doesn't beep. -- |
wolfman8k
Member #508
July 2000
![]() |
Check out my sweet QBASIC game: It's not pure qbasic though. It uses the directqb(the allegro of qbasic) library which is written in assembly
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Wetimer
Member #1,622
November 2001
|
I wrote a program in which you were the government. However, you could have no taxes and be spending lots of money while making a profit Because of all the parking and speeding tickets! <code>if(Windows.State = Crash) Computer.halt();</code> |
Thomas Fjellstrom
Member #476
June 2000
![]() |
So what was the mortality rate in your prog? -- |
23yrold3yrold
Member #1,134
March 2001
![]() |
I tried QBASIC once and sucked at it. Considering my luck there, it's a wonder I ever took on C++. My crowning acheivement was displaying a sprite of Darkwing Duck (which I was big on at the time I wonder if I still have QBASIC on here; might be interesting trying to do something with it now that I'm a C++ badass -- |
nonnus29
Member #2,606
August 2002
![]() |
I made a happy face move across the screen one time on a friends computer in 1997 or something. It would be to hard to do anything interesting without using some additional libs like wolfman pointed out. |
aybabtu
Member #2,891
November 2002
|
My first QBASIC program is this: PRINT "You stink." That was when I was 11. |
Thomas Fjellstrom
Member #476
June 2000
![]() |
My very first BASIC (of some sort) program was similar to that, and written on our Atari 2000 10 PRINT "You Suck" 20 GOTO 10
-- |
Matthew Leverton
Supreme Loser
January 1999
![]() |
Ok, here's mine: [url http://www.leverton.cc/misc/monopoly.zip] It's compiled with QuickBASIC 4.5 for DOS. Runs fine in Windows though. |
Thomas Fjellstrom
Member #476
June 2000
![]() |
heh. coo. You gotta admit though, that for my first 2 hours EVER using/learning QBASIC, that that wasn't too bad -- |
|
1
2
|