Skip to content

Supported Languages

Vadim Grigoruk edited this page Nov 22, 2026 · 26 revisions

TIC-80 supports multiple scripting languages, including:

The 1.4 release builds left Forth out because pForth gave cartridges raw access to host memory. The sandboxed lugforth runtime replaces it in the 1.5 line; tic80.com does not accept Forth cartridges until that release is live.

TIC-80 also supports compiled languages via our WASM support. If your compiled language of choice can compile to Web Assembly there is a good chance you could use it to develop for TIC-80.

You need to specify the language you use by adding one of the following to the metadata:

Language Tag
For Fennel ;; script: fennel
For Javascript // script: js
For Lua -- script: lua
For Moonscript -- script: moon
For YueScript -- script: yue
For Ruby # script: ruby
For Squirrel // script: squirrel
For Wren // script: wren
For Janet # script: janet
For Scheme ;; script: scheme
For Python # script: python
For MiniScript // script: miniscript
For Gravity // script: gravity
For Forth \ script: forth
For WASM -- script: wasm

Note: If no script tag is added it will be considered as a Lua cart.

Starting New Compiled from Source Project

Starting New Scripting Project

To see a demo or start a new project in your scripting language of choice just start up TIC-80 and from the console type new [lang], for example for a Wren project just type:

new wren

Type help new to print arguments for each language.

for some on-screen guidance.

Python Integration

Python integration is based on pocketpy, the list of available modules can be found in the documentation.

You can use this stub file or this more detailed one for vscode's intellisense.

def btn(id: int) -> bool: ...
def btnp(id: int, hold=-1, period=-1) -> bool: ...
def btnr(id: int = -1) -> bool: ...
def circ(x: int, y: int, radius: int, color: int): ...
def circb(x: int, y: int, radius: int, color: int): ...
def clip(x: int | None = None, y: int | None = None, width: int | None = None, height: int | None = None): ...
def cls(color=0): ...
def elli(x: int, y: int, a: int, b: int, color: int): ...
def ellib(x: int, y: int, a: int, b: int, color: int): ...
def exit(): ...
def fget(sprite_id: int, flag: int) -> bool: ...
def fset(sprite_id: int, flag: int, b: bool): ...
def fft(start_freq: int, end_freq=-1) -> float: ...
def ffts(start_freq: int, end_freq=-1) -> float: ...
def fftr(start_freq: int, end_freq=-1) -> float: ...
def fftrs(start_freq: int, end_freq=-1) -> float: ...
def font(text: str, x: int, y: int, chromakey: int, char_width=8, char_height=8, fixed=False, scale=1, alt=False) -> int: ...
def key(code=-1) -> bool: ...
def keyp(code=-1, hold=-1, period=-1) -> bool: ...
def keyr(code=-1) -> bool: ...
def line(x0: int, y0: int, x1: int, y1: int, color: int): ...
def map(x=0, y=0, w=30, h=17, sx=0, sy=0, colorkey=-1, scale=1, remap=None): ...
def memcpy(dest: int, source: int, size: int): ...
def memset(dest: int, value: int, size: int): ...
def mget(x: int, y: int) -> int: ...
def mset(x: int, y: int, tile_id: int): ...
def mouse() -> tuple: ...
def music(track=-1, frame=-1, row=-1, loop=True, sustain=False, tempo=-1, speed=-1): ...
def paint(x: int, y: int, color: int, bordercolor=-1): ...
def peek(addr: int, bits=8) -> int: ...
def peek1(addr: int) -> int: ...
def peek2(addr: int) -> int: ...
def peek4(addr: int) -> int: ...
def pix(x: int, y: int, color: int = None) -> int: ...
def pmem(index: int, value: int = None) -> int: ...
def poke(addr: int, value: int, bits=8): ...
def poke1(addr: int, value: int): ...
def poke2(addr: int, value: int): ...
def poke4(addr: int, value: int): ...
def print(text, x=0, y=0, color=15, fixed=False, scale=1, alt=False) -> int: ...
def rect(x: int, y: int, w: int, h: int, color: int): ...
def rectb(x: int, y: int, w: int, h: int, color: int): ...
def rrect(x: int, y: int, w: int, h: int, color: int, radius=-1, exponent=2): ...
def rrectb(x: int, y: int, w: int, h: int, color: int, radius=-1, exponent=2): ...
def reset(): ...
def sfx(id: int, note=-1, duration=-1, channel=0, volume=15, speed=0): ...
def spr(id: int, x: int, y: int, colorkey=-1, scale=1, flip=0, rotate=0, w=1, h=1): ...
def sync(mask=0, bank=0, tocart=False): ...
def time() -> float: ...
def trace(message, color=15): ...
def tri(x1: float, y1: float, x2: float, y2: float, x3: float, y3: float, color: int): ...
def trib(x1: float, y1: float, x2: float, y2: float, x3: float, y3: float, color: int): ...
def tstamp() -> int: ...
def ttri(x1: float, y1: float, x2: float, y2: float, x3: float, y3: float, u1: float, v1: float, u2: float, v2: float, u3: float, v3: float, texsrc=0, chromakey=-1, z1=0.0, z2=0.0, z3=0.0): ...
def vbank(bank: int = None) -> int: ...
def vqt(bin: int) -> float: ...
def vqts(bin: int) -> float: ...
def vqtr(bin: int) -> float: ...
def vqtrs(bin: int) -> float: ...
def vqtw(bin: int) -> float: ...
def vqtsw(bin: int) -> float: ...
def vqtrw(bin: int) -> float: ...
def vqtrsw(bin: int) -> float: ...

Structured Edition

Structured edition is an edition mode, available only for lisp-like languages like Scheme and Fennel and with the Emacs mode enabled. It helps the user to keep the program well written by automatically balancing the parenthesis and editing code at an S-Expression level. It will be harder to delete parenthesis until the expression is emptied first, to help keep the balance. Here are some key bindings available in structured edition languages:

Key Binding Functionality
ctl-down or alt-shift-( S-Expify (add parenthesis around word or s-expression)
ctl-up Extirp from S-Expression (remove word or s-expression from enclosing s-expression)

Fennel strict Tag

See metadata page.

Using Typescript

Scrambier developped a tool to use typescript in TIC-80 that you can find on the external tools page.

Home
Tips for newcomers

Built-in Editors

CodeΒ | SpritesΒ | MapsΒ | SFXΒ | Music

Console

All commands

saveΒ | exportΒ | loadΒ | importΒ | menuΒ | configΒ | surfΒ | shelfΒ | demoΒ | evalΒ 

Platform

RAMΒ | VRAMΒ | DisplayΒ | PaletteΒ | Bits per Pixel (BPP)Β | .tic FormatΒ | Supported Languages

Other

TutorialsΒ | Code SnippetsΒ | LibrariesΒ | External ToolsΒ | FFT


API

All API functions

Callbacks

TICΒ | BOOTΒ | MENUΒ | BDR

  • SCN (deprecated)
  • OVR (deprecated)

Input

btnΒ | btnpΒ | btnrΒ | keyΒ | keypΒ | keyrΒ | mouse

Drawing

circΒ | circbΒ | clipΒ | clsΒ | elliΒ | ellibΒ | fontΒ | lineΒ | mapΒ | paintΒ | pixΒ | printΒ | rectΒ | rectbΒ | rrectΒ | rrectbΒ | sprΒ | triΒ | tribΒ | ttriΒ | fill patterns

Sound

musicΒ | sfxΒ | FFTΒ | VQT

Memory

memcpyΒ | memsetΒ | mgetΒ | msetΒ | peekΒ | pokeΒ | pmemΒ | syncΒ | vbank

System

exitΒ | resetΒ | timeΒ | tstampΒ | trace

Clone this wiki locally