These are some old QBasic programs I had in a backup of a computer my family used to have. (We used the computer to connect to the Internet over AOL at the time.) According to the file modification dates and comments inside the files I wrote them between 1996 and 1999.
I was amazed when I found that FreeBASIC could compile and run them, even the graphical programs, some with no modification. So I packaged them up and put them here. Despite what the files may claim, I now put them in the public domain.
In middle school and high school I did a lot of programming on my TI-82 graphing calculator in TI-BASIC. Calculator games was its own little scene back then. Some of these programs are ports from the calculator.
You can download all the files together:
bzr get http://www.bamsoftware.com/bzr/qbasicRevision 1 contains the original files as I found them, before making any changes required by FreeBASIC.
While looking at these screenshots, remember that at 320 × 200 or 640 × 480 they took up the whole screen. A few of the programs are not listed here because I couldn't get them to compile. See the README for more.
|Fractal.bas. Generates a Mandelbrot fractal and saves it to a bitmap.|
|ant2.bas. Draws several Langton's ants, written before I knew what they were called. This one grew out of a calculator program. On the calculator the graphics were so slow it took a long time for the ant to build its first highway.|
bamnit.bas. Bamn It! A program that transmits a file over a telephone modem. I can't remember if it worked; I would be impressed if it did.
I took the menu subroutine from a program called BASTerm.BAS by Mark Kim, whose web site was once http://members.aol.com/markkkim but now appears to be http://markuskimi.us/. It is a trivial subroutine but there was a time when I didn't have a concept of a function returning a value; it was mystical to me.
I think the file sending code is based on that of a program called
"Little Bastard" Modem WarFare (MWARFARE.BAS) by Molnar \ Kucalaba
Productions, whose web site was once http://members.aol.com/blood225 but
now appears to be
At least that's what one variable name
bamstart.bas. An animated intro for BAM Software. I think I once planned on running the animation at the start of all of our programs. The code was translated from a TI-82 program with the same effects.
Models an explosion of hundreds of colored pixels. I must have written
this after I learned about data structures (
|bootcamp.bas. This is just a menu subroutine designed to emulate the one on the TI-82. I wrote it for my friend Hyun Gu Lee so that he could port his BOOTCAMP menu-adventure game from the TI-82 to QBasic.|
|box.bas. An experiment with subpixel rendering. The arrow keys move the box. Its edge pixels are colored shades of gray depending on how much of the pixel the box notionally occupies.|
|col.bas. A color displayer. Hit the left and right arrow keys to see all the colors. The comments at the bottom refer to colors for ramismak.bas.|
|fire.bas. This is a little demo of a "going up in smoke" effect.|
|firework.bas. A fireworks physics demo. Press enter to clear the screen or + to save a bitmap (uses the same code as bmper.bas).|
|fonter.bas. This is a test program for the fonts made by fontmake.bas. It displays the contents of a file using a custom font. I think this was inspired by a program called FONTLOAD.BAS. This code is more economical in that it stores one pixel per bit in the font file, not one pixel per byte.|
|fractpix.bas. Another experiment with subpixel rendering. Two progress bars fill up; one aliased and one antialiased. After that aliased and antialiased columns move across the screen. I think the file name is short for "fractional pixel."|
|golf.bas. I'm not sure, but I think this was a test of intersecting two line segments, as part of the physics of a golf game.|
Draws a graph of one or more functions (
An image editor. When I was experimenting with game programming I wanted
a way to draw graphics that was easier than typing the commands to draw
points and lines. However I didn't know how to load bitmapped graphics.
This program lets you draw images using several paint tools. Its output
is executable QBasic code that you just paste in your program. For
example, the spraypaint tool colors random pixels within some distance
of the cursor; for every pixel it draws it writes a
When the program starts it prompts you for a drive and a file name. On Unix you can use something like "a" and "image" to write to the file "A:IMAGE.BAS" in the current directory. Next you must choose the variable names for the X and Y reference points around which the image will be drawn. So if in your program the player's location is stored in the variables playerx and playery, enter "playerx, playery" and those variable names will be used in the output file.
You must then set the initial values of the centerx and centery variables. Use the 2, 4, 6, and 8 to move the cursor and hit 5 when you are over where you want the picture to begin.
Drawing tools. The current tool is indicated by an icon in the lower left corner.
|pong.bas. A graphics demo something like a 3-D game of pong. A circle bounces around inside a room. Press t to toggle tracking lines.|
|quadrati.c. A quadratic formula program, ported directly from the TI-82. It's not a C program; the strange file name is I think an artifact of QBasic's naming algorithm—anything past the eighth character just became the extension.|
A great action game ported from the TI-82. The mission description: "You
are a pilot for the Space Division of the United States Marine Corps.
Your mission is to escort a transport to the next station. If you meet
any hostile ships, open fire." You have to blast enemy ships with a
laser before they crash into you until a timer expires. This is a direct
port from the TI-82, leading to a
|stars.bas. An animated starfield.|
|virus.bas. A phony computer virus that pretends to erase all your files. This came from a TI-82 program as well.|