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, AMOS-class 2-D primitives (RECT/CIRCLE/ELLIPSE/TRIANGLE/POLYGON/FLOODFILL/DRAWTEXT + all fills), PNG sprites with rotation and multi-instance stamping, array-driven TILEMAP DRAW, 1bpp blitter (IMAGE NEW/LOAD/GRAB/COPY/SAVE), KEYDOWN/KEYPRESS, atomic VSYNC frame commit, 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 (Graphics 1.0 — bitmap primitives, PNG sprites with rotation and stamping, tilemaps, 1bpp blitter with PNG/BMP I/O, VSYNC pipeline, keyboard intrinsics, 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 |
|---|---|
| Brand new? Start here — install, hello world, frame loop, sprites in 30 lines, common gotchas | Getting started |
| Download, build, releases, macOS Gatekeeper | Install & platforms |
Full statement & function reference, operators, TI / ST, reserved words, recently added detailed reference |
Language reference |
CLI flags, PETSCII/ANSI, terminal scripting, COLOR / LOCATE |
Terminal & PETSCII |
basic-gfx, screen modes 0..4 (text / 1bpp / RGBA / indexed / hi-RGBA), bitmap primitives, sprites (full API + STAMP), tilemaps, 1bpp + RGBA blitter (IMAGE NEW/CREATE/BLEND/DRAW), HUD OVERLAY, LOADSCREEN, palette load/save, KEYDOWN/VSYNC, scroll zones, multi-buffer SCREEN, mouse, gamepad, sound, music |
Graphics (Raylib) |
RGC IDE, HTTP$, PLATFORM$(), WASM vs native |
Web IDE (WASM) |
HTTP$ / HTTPFETCH / BUFFER* slot-based file-backed HTTP, binary I/O (PUTBYTE / GETBYTE / EOF), CORS notes |
Network & buffers |
MAPLOAD / MAPSAVE JSON tilemaps, BASIC-builder vs JSON |
Level authoring |
| Object types (loot, weapons, spells, traps, McGuffins), enemy AI presets, attack patterns, boss phases — Zelda-class RPG vocabulary | RPG tutorial |
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
- Read Getting started — pick a runtime, run hello world, see the frame-loop pattern.
- Open Web IDE or install binaries.
- Skim Language reference for keywords you need; revisit the Recently added — detailed reference appendix for
BUFFER*,OVERLAY,IMAGE CREATE/BLEND/DRAW,LOADSCREEN,MAPSAVE,PUTBYTE/GETBYTE. - For colourful terminal output or pipes, read Terminal & PETSCII.
- For games, sprites, sound, palette tricks, scroll zones — read Graphics (Raylib) and run the repo
examples/gfx_*.bas/tutorial_gfx_*.basfiles. Open the same basenames in the Web IDE (example). - For HTTP, binaries, large responses, level loading — read Network & buffers and Level authoring.
Documentation aligned with RGC BASIC 1.9.0 (2026-04-18, "Graphics 1.0" milestone). Next major is 2.0 when sound lands. For exact behaviour per release, see CHANGELOG and the 1.9.0 announcement.