-
-
Notifications
You must be signed in to change notification settings - Fork 489
Cartridge Metadata
Metadata is simply a small block of tagged comments that provides additional information to TIC-80. It's good practice to declare metadata at the very top of your source code.
The script
tag is required to run the cart, the virtual machine needs to know the programming language. If not specified, Lua will be used.
Example:
-- title: Worm
-- author: Bob Brown
-- desc: A Clone of the classic Snake
-- script: lua
-- rest of your program goes here
Note: If your code is in an external file, dofile must be placed in the very first line, before the metadata. (dofile
is deprecated as of 0.80)
The full list of metadata tags:
-- title: game title -- The name of the cart.
-- author: game developer -- The name of the developer.
-- desc: short description -- Optional description of the game.
-- script: lua (or moon/wren/js/fennel) -- Identifies the scripting language used; Lua is the default and most commonly used for TC-80 development.
-- input: gamepad (or mouse or keyboard) -- Selects gamepad, mouse or keyboard input source. All input types are enabled by default.
-- saveid: MyAwesomeGame -- Allows save data to be shared within multiple games on a copy of TIC.
The title
and author
tags (as well as a cover image) are required for uploading to the official website.
Should include a short description of your game.
It is required to run the cart, the virtual machine needs to know the programming language. If not specified, Lua will be used.
You can use any of the other scripting languages that TIC-80 supports by adding one the following to the metadata:
Language | Tag |
---|---|
For Fennel | ;; script: fennel |
For Javascript | // script: js |
For Lua | -- script: lua |
For Moonscript | -- script: moon |
For Ruby | # script: ruby |
For Squirrel | // script: squirrel |
For Wren | // script: wren |
For Janet | # script: janet |
For Scheme | ;; script: scheme |
For Python | # script: python |
To enable mouse input only (and disable gamepad/keyboard input) add the -- input: mouse
tag.
It's highly recommended if using pmem to use a unique saveid
. This will allow your cartridge's
persistent memory to persist even if you are still continuing to edit the code. Otherwise a saveid
will be generated for you based on a MD5 hash of your code.
TIC-80 tiny computer https://tic80.com | Twitter | Telegram | Terms
Built-in Editors
Console
Platform
RAM & VRAM | Display | Palette | Bits per Pixel (BPP) |
.tic
Format | Supported Languages
Other
Tutorials | Code Snippets | Libraries | External Tools | FFT
API
- BDR (0.90)
- BOOT (1.0)
- MENU
- OVR (deprecated)
- SCN (deprecated)
- TIC
- btn & btnp
- circ & circb
- clip
- cls
- elli & ellib (0.90)
- exit
- fget & fset (0.80)
- font
- key & keyp
- line
- map
- memcpy & memset
- mget & mset
- mouse
- music
- peek, peek4
- peek1, peek2 (1.0)
- pix
- pmem
- poke, poke4
- poke1, poke2 (1.0)
- rect & rectb
- reset
- sfx
- spr
- sync
- ttri (1.0)
- time
- trace
- tri & trib (0.90)
- tstamp (0.80)
- vbank (1.0)