QB64 is a free BASIC programming language that is just like QBasic but can compile and run in current Windows versions and includes many added commands as well. This website has mostly code to copy/paste to make your own programs. If you don't have QB64 and wish to check it out, first bookmark this page and then get a .7z extracting program first if you don't have one, here: https://www.7-zip.org/download.html.

Then go get the free QB64 programming language to make the programs I have here on this page and any you wish to make for yourself. Get the free QB64 programming language here: https://www.portal.qb64.org/. The QB64 website also has a GREAT Wiki section on all of the commands it uses as well as a forum and chat room. I have not tested my programs or QB64 on other operating systems besides Windows 10 Home Edition. There are other versions of QB64 on that website for other operating systems.

Here are programs I've made as examples to learn by. I hold no responsibility for any problems you may find with them, I tried my best to make sure there are no problems. BASIC programming has always been a first-level programming language to start people out with learning to program. Also, QB64 has quite a few new commands added to it that QBasic doesn't have so don't try and run these files with QBasic, only QB64, unless you know how to remove the newer commands first.

To get my programs, first, click the link to the code's text file, then copy and paste the program into your QB64 BASIC computer language and save them. When you run them, it will compile the code to a Windows .exe file in your QB64 folder. You also can right click each .txt link and save as a .bas file to open directly with your QB64. Or of course, you also can save it as a .txt file and rename it as a .bas file in Windows. The reason I don't link directly to .bas files is because many web browsers will save a .bas file to a .bas.txt file. A couple of my programs are in zip format which do have the .bas file in them.






My Programs For QB64

** New Big Text Maker! Click here to go there.

** New Pie Chart Maker 2! Click here to go there.

** Updated version of Paint Pixels 5! Click here to go there.

** Updated version of Calendar Maker! Click here to go there.

Click here to go to the newest programs at the bottom of this page.

You can copy/paste any or all of this code to your QB64 from the .txt file of each program.





First, here's a very simple program that is often learned within the first couple weeks of programming.

1. Dice Roller

This program rolls 2, 6-sided dice and gives the outcome of each one. You can roll as much as you want.

DiceRoller.txt



2. Ping Pong 2

Play Ping Pong against the computer!

Thank you to bplus from the QB64.org Forum for some great help on the update.

PingPong2.txt



3. Ken's Conversion Calculator

Convert Gallons to Liters, Miles to KM, Fahrenheit to Celsius, MPH to KM/h, and vice versa to all of these.

KensConversionCalculator.txt



4. Ken's Timer

Have the computer count up in seconds, minutes, hours, or days. Or count down from seconds, minutes, hours, or days (up to 30 days).

KensTimer.txt



5. List Alphabetizer

Make a list using this program and then automatically alphabetize it. It also can print out the list using your printer.
It can make up to 5000 lines on the list and it also saves to a .txt file that can be opened with Windows Notepad and other programs.

ListAlphabetizer.txt



6. Analog Alarm Clock

This is an analog alarm clock. This uses QB64's _DELAY command and made the program much smaller. I also made this into a 24 hour alarm clock which will play some sounds and tell you when the alarm goes off.
Also I just added chimes to this version that plays the hour chimes on top of every hour on the hour.

AnalogClock.txt



7. Ken's Artillery Game

Go against the computer in this classic game of Artillery. I've wanted
to make this game since the 80's and finally found out how with math help from someone named B+ on the QB64.org forum.
You have a cannon on a base on one side of a random sized mountain and your goal is to hit the computer's base on the other side of the mountain with cannoballs. You type in the angle and power of your cannon and it shoots.
The first one to get 5 points wins the game. Have fun!

KensArtillery.txt



8. Ken's Plotter

This simple plotting tool can either be used just to draw with or to plot points for a game or program you want to make in the future. The files it saves under has a .txt extension.
You cannot change colors with this program, just draw, erase, save, and load. Each plot is 10 x 10 pixels on a 640 x 480 pixel window. So if you wish to use a saved picture you make with it, add 10 to both X and Y for each coordinate as well as a color.
Please read instructions before using, which are on the welcome page.

An example program on how to use pictures made with this is right after this program, which lets you move around and it detects the lines (walls) before it hits them.

KensPlotter.txt



9. Wall Detector Example (Used with the above "Ken's Plotter").

With this program, you can load a picture (or maze) made with the above program called "Ken's Plotter". You control a little red square with the arrow keys to move around through it and it detects the walls and stops automatically before it hits them. You need to make a picture with "Ken's Plotter" before you run this program.

WallDetectorExample.txt



10. Tank Walls (Used with the above "Ken's Plotter")

Battle against the red computer tank with a little blue tank with the arrow keys and shooting with the space bar. You can also change the direction of your shot as it goes by also using the arrow keys. One great thing is that you can make your own wall maps by using the above "Ken's Plotter" program I made. You start out with 5 tanks and you get 10 points for every tank you hit. The computer tank will come after you if you are in the same hallway or room so be quick! :) Load a picture .txt file made with the above "Ken's Plotter" and/or save my simple example maps I've made, by right clicking this: halls.txt. And this for the second example: halls2.txt. Your map graphic must be in the same folder as Tank Walls. Keep these 2 halls files as .txt files to be able to use them.

TankWalls.txt



11. Tank Walls 2

Go against the Red Tank again except this time he is more cunning and deceptive! Also, all of the levels have been already made this time, 20 maps total, so no need to load any maps first when playing. You get to a new level when you have shot 10 tanks and received 100 points. After 20 maps, it goes back to the first. But the level numbers themselves keep going forever until your 5 tanks are gone. All files are in TankWalls2.zip so after downloading, open this file and copy "Tank Walls 2" folder to your computer. The maps are in their own folder within the first. To run, open Tank Walls 2.bas with your QB64 programming language and run it from there. Feel free to use the .exe version for Windows as with the rest of my programs. Just make sure the walls folder, that has the maps, is inside the Tank Walls 2 folder.
This is a freeware game made by me (Ken G.). So enjoy playing and listening to the retro sound effects. Have fun!

Download by clicking this: TankWalls2.zip



12. Brick Smasher

Play this Breakout/Arkanoid style game by moving your paddle with your mouse's wheel to deflect the ball to hit the bricks. When all the bricks are gone, you go to the next level. You start out with 10 paddles and each level has a random color of bricks, so every game is a little bit different. To quit anytime before the game is over, press the Esc key. This game is in full-screen.

BrickSmasher.txt



13. Card Game 21

This is an old 1990's game I made back then but just updated. Play the card game of 21 against the computer. Whoever gets closest to 21 without going over wins. This is a very simple game that should be learned pretty easy by a BASIC programmer if you follow where the loops go to. Have fun!


21.txt



14. Race Car

Steer around incoming cars and oil slicks and try to stay on the road with this retro-looking race game! The farther you go, the more points you get. Try and beat the Top Ten people on the scoreboard. This game makes a text file called "toptenracers.txt" for the Top Ten that is displayed at the end of the game. If you wish to reset the list, just erase "toptenracers.txt" and it will make a new one. I suggest saving this game to its own folder so you have both files together and easy to find. As usual, thanks again to the guys at QB64.org's forum for some tips and help. This is Version 3 of the game which all versions have been in development for a couple days. One big reason why I made this game is that I've always wanted to make a game that was a lot like a hand-held electronic game I had in the early 80's. There are no turns, just a straight road to dodge the cars and oil slicks. You start out with 5 cars and you get another one every 3000 points. Your final score is your regular score times how many cars you pass. You can go faster or slower and left and right with the arrow keys. Have fun!

RaceCar.txt



15. Ken's Tunnels

Walk down the tunnels and shoot the monster ahead of you before he shoots back. Also, use the doors on each side to go to a different tunnel to dodge the monster. Walk far enough and you win the game! Every game has different colors, length, etc. This is in a zip file with the 2 door pictures and the .bas file. Put all 3 in the same folder for it to run. Run the .bas file by first loading it into your QB64 language. Game directions are on the welcome screen. Have fun!

Tunnels.zip



16. Alphabet Invaders

Move your little + guy back and forth with the arrow keys and press the Space Bar to fire on the letters coming down toward you one at a time. If a letter reaches the ground, you explode. The object of the game is to destroy 100 letters and then you win the game. There is no graphics on this game, just text movement. Enjoy!

AlphabetInvaders.txt



17. Lemonade Stand

A business simulation for all ages! Sell lemonade at your stand for your set price, buy advertisements to gain more customers, and hope the gusts of wind don't come to destroy your advertisements! Play this as long as you have enough money or wish to end it. You start out with $20 and go from there. Good luck!

LemonadeStand.txt



18. Fun Math Graphics

Watch your computer draw a circle, ellipses, curves, peaks, valleys, meshes of peaks, etc. all done with the same equation but just using different numbers. At the end I added different equations to make a spiral.

FunMathGraphics.txt



19. Tech Invaders 2

Click here to watch a YouTube video of Tech Invaders 2.



This game is a cross between Galaga and Space Invaders, but isn't as complex. Have fun shooting each of the robots that shoot back at you and the Boss Robot after those. Then the game goes back to the first after you have killed the Boss Robot but stays as hard as the Boss was. This game uses the math from my last program "Fun Math Graphics" to make the aliens fly around in patterns. I also added a Top Ten score page at the end like I did with Race Car. This might be a great game for intermediate BASIC programmers to learn from and use parts of.

This is version 2 has: 3 enemy robots to shoot at instead of 1 at a time, a Boss Robot status bar that shows you how much you have left to shoot him, different graphics, etc.

TechInvaders2.txt



20. JPG2TXT (JPG Graphics To Text Artwork Maker)

This program converts a simple jpg graphic file (but not a camera-type or detailed picture) into a text file. It also lets you preview it first before you save it as .txt. Then it opens the .txt file with your default .txt program (such as Windows Notepad). From there, you can change the font to size 8 or so and print it out on your printer if you wish to. The size limit of your graphic file must be 800 x 600 pixels or smaller or it won't come out. I've tried a camera picture with it but it's not too detailed on the text. The text involves 68 different keyboard characters. The program detects brightness and puts the least bright character with the least bright pixel and up from there. Your graphic file must be in the same directory as the program.

jpg2txt.txt



21. Calendar Maker (With Picture Save and Printer Support)

Make a calendar of any month from the mid-1700's to the year 9999 A.D. automatically! You can also easily save them as a separate BMP picture file (which can be used anywhere) and/or print them out with your printer. You can hang them on your wall, use on your desk, or file them away. Plus you can just check out what many historic months looked like or ones in the far future! Have fun!

New updated version has Sundays and holidays colored in and holiday names centered better. Also added is the option of making calendars without holidays. The newest addition I just added is the ability to add holidays or information to any dates on the calendar you make, up to 12 letters, numbers, characters, or spaces per day. These new dates are also filled in with a yellow color. With a black and white printer they come out a nice shade of gray. This can be used around the house or at a business. Enjoy!

Click here to see a January 2020 calendar example.

CalendarMaker.txt



22. Fireworks

Watch a short fireworks show on your computer with this program. There's a couple surprises at the end, so watch until the end. The show lasts around 3 minutes. To end anytime, press Esc.

fireworks.txt



23. Starfield 2000

Watch the stars fly by you in 3D in all different directions. Use the arrow keys to go faster or slower (up and down), and right and left arrows to see the stars from the sides. Space Bar brings it back to center. Thanks again to B+ and the guys on the QB64.org Forum for the help.

Starfield2000.txt



24. Tic-Tac-Toe

Use your mouse to play this classic game against the computer. There's also some sounds and it uses graphics. I've wanted to make this game since I was a kid in the 80's. :)

Tic-Tac-Toe.txt



25. Solar System Simulator

Use your mouse wheel to zoom in and out to see all the planets. Also use the up and down arrow keys to tilt the entire simulation to see it from a 3D perspective. Plus move the mouse over each planet and Sun to read which one it is. The planets are only colored circles, except Saturn does have rings around it. So don't expect much in graphics, but for a programmer, this is a great way to learn orbital animation and tilting. There's no welcome screen but the directions are on the Title Bar of the program. Enjoy.

SolarSystem.txt



26. Lightning Globe

Use the mouse to click the globe to watch electricity go from the center of the globe to where you click. This is a simulation program of the real lightning globes you can purchase in stores. There's no sound, but I tried to make it look as good as I could. Have fun!

LightningGlobe.txt



27. Speed Typing Test

This non-professional speed typing test tells you how many correct 5-letter words you can type per minute. It has 234 words so even the world record holder wouldn't get that far and get them all correct most likely. The words are randomly arranged every time you run this program. If you hit the wrong key, it goes to the next word. So do not press Enter, Back Space, or Space Bar. After the word is complete, it will go to the next one automatically. Enjoy!

SpeedTypingTest.txt



28. Black Hole (Kaleidoscope)

This simple program shows a spiral of filled-in circles that change shades of gray and white. Then when you press the Space Bar they all change to random colors. You can go back and forth from white/gray to colors by just pressing the Space Bar. I hope you like it. :)

BlackHole.txt



29. Paint Pixels 5

This program lets you draw (paint) with the mouse, make rays (lines), orbits (circles), and filled-in boxes. Press the mode key and then use the mouse to choose a desired size and then click the mouse button to place it. You can save your picture as a common .bmp picture file that can be used with most graphics programs. Plus you can print them out on a USB printer. It saves your picture as a 800 x 600 pixel .bmp file which is around 1.4 MB in size for each picture file for this type of file. If you wish to convert to JPG or another type, you can always load it in Windows Paint or another program and save it as any other type.

** This is a needed upgrade from my old Paint Pixels 1, 2, 3, and 4 that I used to have on this website. Please delete the older version(s) and use this one instead.

Here is an example Jet.bmp picture that I made using the new Paint Pixels 5: Jet.bmp.

PaintPixels5.txt



30. Pie Chart Maker 2

Create from 1 to 500 pieces (slices) on a pie chart with this program. When it starts out, it asks you for how many slices and then for a percentage. That is the percentage of the one piece of the pie chart you want filled in. Then it will keep asking you percentages for each piece of the pie chart you want to make. It will then create the pie chart. Then you have some choices of (T)ext, (P)rint, (S)ave, (D)elete, or Esc to Quit. If you wish to add text anywhere in or around the pie, press T to go into TEXT MODE. Then use your mouse and left click anywhere you want the text to be at. Then type it out and press Enter. Once you press Enter it will go out of that mode and back to the main mode. If you want more text, press T again. To print to your printer, press P and then it will verify that you want to do it and then it will print out on paper. Pressing S will go to the saving screen where you can save it under a name as a .bmp picture file. This type of file can be used with almost any graphics program if you wish to do more with it. From the main picture screen, you can delete it and start again by pressing D. And then Esc ends the program (or clicking the top right X on the window as usual.) Enjoy!

Click here to see an example picture it can make.

PieChartMaker2.txt



31. Big Text Maker

Big Text Maker converts regular words, symbols, or numbers to different sizes and colors. You can choose "mixed colors" and the text will be in different mixed colors per letter, symbol, or number. There's a limit of 23 letters, symbols, letters or spaces per picture. You can save it by pressing S to a .bmp picture file. Increase or decrease the size by using the up and down arrow keys. The commands are in the Title Bar. This code would be good for making games and programs with different sized text graphics. This program does not use font files, only math.

BigTextMaker.txt



More Coming Soon!

Scroll up some for the newest programs on this page.

Thank you for visiting!








Visitor Hit Counter





Terms of Use