RGC BASIC — overview
RGC BASIC (Retro Game Coders BASIC) is a modern, cross-platform BASIC interpreter written in C. It takes inspiration from Commodore BASIC V2 (line numbers, POKE/PEEK idioms, PETSCII) but adds structured syntax, user-defined functions, real file I/O, graphics, and more — so you can use GOTO when you want it, or write in a more structured style when you do not.
You can run it in five complementary ways:
| Where | What you get |
|---|---|
| Web IDE (WASM) | Same interpreter in the browser — instant share, no install |
Terminal (basic) |
Scripting, pipes, ARG$ / SYSTEM / EXEC$, PETSCII→ANSI |
Graphics (basic-gfx) |
Raylib window — 40×25 PETSCII, POKE screen RAM, PNG sprites (tilemaps, z-order, collision), bitmap, scroll, gamepad |
| Windows / macOS / Linux | Prebuilt binaries for all three |
This documentation set includes a full language reference (statements, intrinsics, meta directives, system variables, host matrix), deep Terminal & PETSCII and Web IDE pages, and a complete graphics chapter (bitmap, PNG sprites, scroll, gamepad) — so routine API detail lives here, not only in the GitHub README. The repo remains the source of truth for every edge case and version note; we link to it where it helps.
Quick links
| Topic | Page |
|---|---|
| Download, build, releases, macOS Gatekeeper | Install & platforms |
Full statement & function reference, operators, TI/ST, reserved words |
Language reference |
CLI flags, PETSCII/ANSI, terminal scripting, COLOR / LOCATE |
Terminal & PETSCII |
basic-gfx, virtual memory, bitmap, sprites (full API), INKEY$, TI, scroll, gamepad |
Graphics (Raylib) |
RGC IDE, HTTP$, PLATFORM$(), WASM vs native |
Web IDE (WASM) |
Project links
- Repository: github.com/omiq/rgc-basic
- Releases: github.com/omiq/rgc-basic/releases (stable) and nightly (automated builds from
main) - Examples:
examples/in the repo — demos for trek, PETSCII viewers, gfx games, scripting, etc. Many of the same*.basfiles are bundled in the Web IDE RGC BASIC preset — open directly, e.g. petscii-data.bas, trek.bas, gfx_game_shell.bas.
How this relates to other docs here
- Commodore BASIC V2 — the ROM dialect on real C64/VIC/PET hardware in emulators inside the IDE.
- RGC BASIC — its own interpreter and language; not a C64 emulator, but familiar syntax and PETSCII-oriented features.
When you outgrow “toy” snippets and want real files, JSON, shell glue, or Raylib games, RGC BASIC is aimed at that — locally or in the IDE.
Suggested learning path
- Open Web IDE or install binaries.
- Run a tiny
PRINT/FORprogram, then skim Language reference for keywords you need. - For colourful terminal output or pipes, read Terminal & PETSCII.
- For games, sprites, and
.seqart, read Graphics (Raylib) (full sprite/bitmap API) and run the repoexamples/gfx_*.bas/tutorial_gfx_*.basfiles — or open the same basenames in the Web IDE (example).
Documentation aligned with RGC BASIC v1.5.x-class features described in the upstream README; for exact behaviour per release, see CHANGELOG.