QBasic / QB64 Tutorial List

A Computer Language for Beginners
There are Over 60 Tutorials and 100s of Programming Examples

Installing QB64 and QBasic 1.1. on Windows 10
This tutorial shows how install QB64 & QBasic 1.1 on Windows 10.

Installing QB64 and QBasic 1.1 on Mac
This tutorial shows how install QB64 & QBasic 1.1 on macOS.

QBasic 4K Animation Code
QB64 can make 4k drawing animations.

QB64 360 VR Animation Code and Links
QB64, with some other software, can make 360 VR Animation Videos

Tutorial 1 - First Program
QB64 / QBasic is a simple to use and learn computer language. QB64 / QBasic is free and works on most computers. This tutorial will get you started programming in QB64 / QBasic.

Tutorial 2 - Printing Math
In Tutorial 1, we saw that PRINT was capable of printing text surrounded by quotes. PRINT is capable of doing a bit more. PRINT is capable of printing calculations too.

Tutorial 3 - Print Formatting
Within this tutorial, print formatting will be used to show the user what calculations are being used.

Tutorial 4 - Variables and Data Types
The computer can hold data in memory. The programmer must tell the computer what type of data to hold. This is called a data type.

Tutorial 5 - Type Mismatch and Other Data Type Errors
It is very important that the data matches the data type of the variable. If the data does not match the data type then a type mismatch occurs.

Tutorial 6 - User Input
This tutorial will show how to get user input.

Tutorial 7 - If Statements
If statements are used to check conditions in the program

Tutorial 8 - Select Case Statements
Select-Case statements work like If statements. The difference is that the Select-Case statement can make the code simpler to read and work with than If statements.

Tutorial 9 - While Loop
This tutorial will show the While loop.

Tutorial 10 - Do Loop
This tutorial will show the Do Loop

Tutorial 11 - For Loop
This tutorial will show the For Loop

Tutorial 12 - Simple Calculator with Input Validation
This tutorial will show how to make a simple calculator program that asks the user for two numbers.

Tutorial 13 - Random Numbers
This tutorial shows several pitfalls in making random numbers. It is a good idea to practice making random numbers and random number generators on your own.

Tutorial 14 - Guess My Number Game
We will make the classic game Guess My Number. It is a very boring game to play, by today’s standards, but programing the game can be interesting.

Tutorial 15 - Arrays
An array is a collection of elements (variables) of the same data type.

Tutorial 16 - Parallel Arrays
Parallel Arrays are separate arrays that work together.

Tutorial 17 - 2D Array - Matrix
Multi-Dimensional Arrays are several arrays that are combined into one. Some examples where a 2 dimensional array might be used would be a chess board, grid, and a deck of cards.

Tutorial 18 - Matrix Read Data
This tutorial will modify the code made within Tutorial 17. This tutorial will show a different way of loading data into an array. By using READ and DATA, the code can be more compact and easier to read.

Tutorial 19 - Highest and Lowest Array Element
This tutorial will show how to find the highest and lowest number within an array.

Tutorial 20 - Boolean Techniques
Unfortunately, QBasic1.1, QuickBasic 4.5 and QB64 do not have built in Boolean data types. However, here is three techniques showing how to use Boolean logic within QBasic / QB64.

Tutorial 21 - Preventing Duplicate Data in the Same Array
By checking the contents of the array, we can prevent duplicate data from entering into the array.

Tutorial 22 - String Manipulation
This tutorial will show how to manipulate strings. The program will print strings vertically, upside down vertically, and in pieces.

Tutorial 23 - Palindrome Program
This tutorial will show how find if a word or string is a palindrome. A palindrome is a word or string that is the same printed forwards and backward.

Tutorial 24 - ASCII Program - Separating Letters, Numbers, and Other Characters
Sometimes we need to separate parts of the string. This program will checks each character in the string and separates the characters into letters, numbers and other characters.

Tutorial 25 - Sound and Music
There are a few ways of making sounds and music in QBasic / QB64. This tutorial will show you how to make songs.

Tutorial 26 - Screen Coordinates
Screen 13 will be used within this tutorial. Screen 13 has a resolution of 320 x 200.

Tutorial 27 - Screens
There are several screen that are used within QBasic 1.1. QB64 can make custom screens.

Tutorial 28 - Drawing Part 1
This is the introduction to QBasic drawing. SCREEN 13 is used within this tutorial. Line, Box, Box Fill, Paint and Circle will be shown.

Tutorial 29 - Drawing Part 2
SCREEN 13 is used with in this tutorial. This tutorial is a continuation of Drawing Part 1.

Tutorial 30 - Drawing Part 3
This tutorial is a continuation of Drawing Part 2.

Tutorial 31 - QB64 Drawing Part 1
This tutorial focuses on drawing with QB64.

Tutorial 32 - QB64 Drawing Part 2
This tutorial is a continuation of QB64 Drawing Part 1.

Tutorial 33 - Moving an Object With the Keyboard
This tutorial will show how to move an object (drawn circle) around the screen using keyboard keys.

Tutorial 34 - Moving an Object With Arrow Keys
This tutorial will modify the code used within Tutorial 33.
To use the arrow keys, we need to know the PC Keyboard Scan Codes for keyboard arrow keys.

Tutorial 35 - Making a Sub in QBasic 1.1
As programs become more advanced placing all the code in the main program can make the program more difficult to program, maintain, and understand. Slicing the program into sections can help.

Tutorial 36 - Making a Sub in QB64
This tutorial will show how to make a sub in QB64.

Tutorial 37 - Passing Values to Subs
When we made subs in the previous tutorials, we needed to use SHARED to use the same variable within a sub. If we do not wish to make shared variables, we can pass the values to the sub.

Tutorial 38 - Making a Function
Functions are very similar to subs with exception that functions return values back to the part of the program that called the function.

Tutorial 39 - Text Files Part 1
Up to this point, all information, used by the programs could not be saved. When the program was closed all information was lost. To keep information saved, in QBasic, text files must be used.

Tutorial 40 - Text Files Part 2 - Checking if the File Exists
Continuing from Part 1, the next program shows what happens if a file, that does not exist, is opened for input.

Tutorial 41 - Text Files Part 3 - QBasic Quiz Questions Program - QB64
Continuing from Part 2, this program will open a text file, that contains questions and quiz the student.

Tutorial 42 - Text Files Part 4 - Saving Preferences
A text file will be created to save preferences for a program.

Tutorial 43 - Text Files Part 5 - Copy Text Files
A text from one text file will be copied into another text file. An identical backup will be made.

Tutorial 44 - Type Example
A type can hold multiple variables.

Tutorial 45 - Type Array
This tutorial shows how to use an array with a type.

Tutorial 46 - Weather Type
Because types can hold multiple variables, a type can be used in place of parallel arrays.

Tutorial 47 - Inserting a Picture
This tutorial shows how to insert a picture in QB64.

Tutorial 48 - Bouncing Ball Animation
A picture will move around the screen.

Tutorial 49 - Bouncing Balls Animation
This is a remake of Tutorial 48 to allow an array of balls to bounce around the screen.

Tutorial 50 - EZInvaders Video Game
A simple video game will be made within this tutorial.

Tutorial 51 - Removing Spaces From Numbers and Strings
LTRIM$, RTRIM$, and STR$ functions are use to remove extra spaces from strings and numbers.

Tutorial 52 - Loading Multiple Images Into an Array
This tutorial shows how to load multiple images into an array using a loop. The images can be easily displayed from the array.

Tutorial 53 - Gorillas, Nibbles, Games, Graphics, & OpenGL Examples
QB64 comes with hundreds of programming examples and free code to view. The code can be found in the samples folder. The folder is part of the QB64 zip folder that can be downloaded at ww.qb64.org.

Tutorial 54 - Making QBasic Smile by Drawing a Face
This tutorial shows how to make a semi circle into a smile. For more information on drawing see Tutorials 26 - 32. This tutorial also shows how to insert a picture.

Tutorial 55 - Mouse Interface Part 1
This tutorial shows how to get mouse input using QB64.

Tutorial 56 - Mouse Interface Part 2 - Adding a Button
This tutorial shows how to add a button (graphic) and make it clickable with the mouse. The tutorial shows the hit detection of the mouse. This is a QB64 only program.

Tutorial 57 - Mouse Interface Part 3 - Picture Follows the Mouse
This is a fun little program. A picture follows the mouse path around the screen. This program is a QB64 only program. QBasic 1.1. will not work with the code.

Tutorial 58 - Making a Screen Saver for Windows
QB64 can make screen savers. Making a screen saver is very easy to do.

Tutorial 59 - Making a Drawing Animation
This tutorial shows how to make a drawing animation using CIRCLE, colors and loops.

Tutorial 60 - Make an 8K, 4K, HD Drawing Animation
BMP Images can be converted to a video file. That video file can be uploaded to YouTube.