Skip to content
TimotheeGreg edited this page Aug 29, 2023 · 9 revisions

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

The title and author tags (as well as a cover image) are required for uploading to the official website.

The desc Tags

Should include a short description of your game.

The script Tag

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

The input Tag

To enable mouse input only (and disable gamepad/keyboard input) add the -- input: mouse tag.

The saveid 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.

The Fennel strict Tag

TODO

Clone this wiki locally