What?
QB64 is a BASIC programming language. BASIC has fallen out of favor over the years but it is what many of us who started programming in the 1990’s or early 2000’s cut our teeth on.
The language was designed to be compatible with one of the most popular BASIC implementations – QBasic/QuickBasic. It is almost entirely compatible with QBasic/QuickBasic but there are some edge cases in which code is not completely compatible or the code does not exactly emulate the behavior of the earlier language.
The fact that QB64 is compatible with QB does not mean that it is limited to QB functionality. The language has been extended to include significant innovations and can be used to create real applications.
The thing I love most about QB64 is that it is quick and easy to learn just like its predecessor. You can build substantive applications without knowing an entire ecosystem of tools and reams of boilerplate.
This is the language I use to modernize W.R. Hutsell’s classic war games. At some point I’d love to entirely rewrite them in C# or JavaScript – but in the meantime, QB64 offers a quick way to modernize legacy code.
How to Learn QB64
There are several quite good and fairly extensive resources for learning QB64.
- Game Programming with QB64 by Terry Ritchie.
- Covers installation, the IDE, variables, conditionals, branching, looping, graphics, subroutines, functions, input, arrays, string manipulation, math functions, file I/O, audio, sprites, and more.
- QBasic / QB64 Tutorial List: A Computer Language for Beginners by SchoolFreeware.
- Covers installation, printing to the screen, variables, data types, errors, user input, conditionals (if, select case), loops (while, do, for), random numbers, arrays (parallel arrays, 2D arrays), booleans, string manipulation, audio, screen coordinates, drawing, subroutines, functions, file I/O, mouse input, and more.
Tools / Utilities
- Deark – Can convert files in a variety of arcane formats to more modern formats. For example, memory dumps using BSAVE to JPG.
Code Libraries, Etc.
- Adaptive LZW Packer/Unpacker (Public Domain, RhoSigma)
- FileToDATA Converter (RhoSigma)
- Background Downloading from Internet (SMcNeill)
- Mouse Demo Using Device Commands (SMcNeill)
- Split and Join Strings (luke, RhoSigma)
- Seeking Best Ellipse Fill Function (STxAxTIC)
- EllipseFill (SMcNeill)
- SaveImage, also SaveImage Library (SMcNeill)
- Speed Comparison Tool (SMcNeill)
- CircleFiller (SMcNeill)
- Steve’s Extended Toolset (SET) Library (SMcNeill)
- Binary Search Method (SMcNeill)
- NumType (SMcNeill)
- Dictionizer: Useful Utility and Study of Hashing (STxAxTIC)
- List Linking Demo (SMcNeill)
- Image Processing Library (RhoSigma)
- Select Printer (Juanjogomez, euklides)
- Add Multiple Files to an Exe (Petr)
- Simple Pseudo Random Number Generator (SPRNG) (Zeppelin)
- Convert Image Content to PSET Expressions (pagetelegram)
- Sprite Library Revisited (TerryRitchie)
- SaveBMPLibrary (SMcNeill)
- QDBase (SMcNeill)
- Frame Library (SMcNeill)
- Scheme (LISP) Interpreter (qbguy, STxAxTIC)
- ICONs Image Loader (Petr)
- Sprite Library Loading (TerryRitchie)
- qXed: Linked List Text Editor (STxAxTIC)
- CodeGuy Standard Sorting Library (CodeGuy)
- $AutoSave (SMcNeill)
- Steve’s Oldies (SMcNeill)
- $Replace (SMcNeill)
- PNG Chunk Information (SMcNeill)
- B+ Pathfinder (bplus)
- Mouse Pointers (Petr)
- Direct Bitmap Reading (Petr)
- TCP/IP Local Community Sample (FellippeHeitor)
- SUB thickLine (FellippeHeitor)
- DBF Conversion/Use Programs (SMcNeill)
- File Listing (SMcNeill)