A Tiny Basic you can run in your browser. The screen is 160 by 100 pixels with four colors (black, two grays and white), like an old pocket device, and everything is typed at a > prompt in a hand-drawn 4 by 6 pixel font.

Try it now. Click the screen, then type:

load "strek"
run

to play Star Trek, or load "minesweeper" for Minesweeper. Type files to see everything you can load, and help for the commands.

Write your own. Lines that start with a number are your program; anything else runs right away.

10 input "Name: ", n$
20 print "Hello, " + n$ + "!"
30 for i = 1 to 3 : print i; " squared is "; i * i : next i
run

What it can do

  • The classic Tiny Basic: print, input, if/then/else, for/next with step, goto, gosub, rem, and : to put several statements on a line.
  • Whole-number math, long variable names, @(n) arrays, and string variables (name$) with left$, mid$, chr$, str$, val, instr and friends.
  • Graphics on the same screen as the text: color, pset, line, rect, text, locate, pget, plus GW-BASIC-style draw strings (draw "BM30,80 U20 R20 D20 L20") with paint.
  • Games: inkey and key(n) read the keyboard, wait n paces your loop, and play "T200 O5 C E G >C" plays tunes on a square-wave voice.
  • save "name" and load "name" keep your programs in your browser. The Import and Export buttons (bottom right) move a program in and out as a .bas text file.

New to programming? Download the free guide, Programming Tiny Basic (PDF, 29 pages, with screenshots and example programs), from the downloads on this page.

Esc stops a running program. You need a keyboard; there is no touch support yet.

Made with: Odin, compiled to WebAssembly. The interpreter follows Ed Davis's collection of Tiny Basic interpreters, which are written as "pure" interpreters that re-read the program text as they run. The font is hand drawn by TheGrumpyGameDev. The Star Trek program is a Tiny Basic version of the classic game; Minesweeper is by Marcus. The tunes use the same PLAY dialect as TheGrumpyGameDev's Anvil of SPLORR!! sound editor. The interpreter was made with Claude (generative AI) working alongside TheGrumpyGameDev.

Published 7 days ago
StatusReleased
CategoryTool
PlatformsHTML5
AuthorThe Grumpy GameDev
TagsAI Generated
AI DisclosureAI Assisted, Code, Graphics, Sounds, Text

Download

Download
tiny-basic-programming-guide.pdf 655 kB
Version 2 7 days ago

Leave a comment

Log in with itch.io to leave a comment.