Docs Examples
Language Libraries Download
╯ plan9basic — examples
LOAD "FUN_EXAMPLES.BAS"
Scanning examples... 30 programs found
Categories: backend[18] frontend[12] games[9]
LIST
' From math tricks to full arcade games
' Simple code, real results
READY.

FUN EXAMPLES IN PLAN9BASIC

Learn by doing — from one-liners to full applets. Each example is a complete, runnable program you can paste and play with.

50
examples
18
backend
12
frontend
20
AI examples
9
arcade games
AI EXAMPLES WORK WITH:
OllamaLOCAL & FREE
AnthropicCLOUD
OpenAICLOUD
GroqCLOUD
DeepSeekCLOUD
 + xAI · Together · Fireworks · lmStudio · Jan
💻
BACKEND & DATA
Math, strings, arrays, dictionaries, files, databases, networking
18 examples
🎮
FRONTEND & VISUAL
GUI applications, games, animations, visual effects, drawing, AI integration
12 examples
🎮
ARCADE GAMES
Full games written in Plan9Basic — desktop & mobile, keyboard & touch
11 games

Tractor, running

A fixed shooter written from nothing for this project. Every ship is drawn by the program from rectangles and ellipses — there is no image file in it anywhere. Find it in the cards above ↑

Tractor: the formation settled, three kinds of enemy in place
The formation. Enemies fly in along curved paths and settle into a grid that breathes. Blue darts at the back, orange escorts, and the green leaders at the corners — the only ones that can take your fighter.
Tractor: RESCUED, and two fighters flying side by side
The rescue. A leader took that fighter and paid for it on its next dive. Two hulls now, two shots a volley — and twice the width to be hit in, which is the bargain.

Space Mines, running

Ten years running a mining colony on Astron, converted from a 1982 Usborne type-in listing. The rules are the book’s; the panel is not. Find it in the cards above ↑

The Plan9Basic IDE beside the Space Mines applet it is running
The IDE on the left, the applet it launched on the right.
Space Mines at year one, refusing a food budget the treasury cannot cover
Year one. The line under the fields costs a plan out as it is typed — here refusing a food budget the treasury cannot cover, before a single year is committed.
Space Mines ending early: fewer than ten people to a mine
Year six. One more mine put the colony under ten people to a mine, and the 1982 rule ended it there. The figures carry what the year cost: 700 tons gone, output down eleven.
🤖
AI INTEGRATION
20 examples ordered by complexity — from a single API call to full applications.
20 examples