Command Line Arguments - nesbox/TIC-80 GitHub Wiki

Native versions of TIC support some arguments when called from the command line or other programs (such as an external editor). Absolute and relative file paths are supported.

$ ./tic80 -h
Usage: tic80 [cart] [options]

TIC-80 startup options:

    -h, --help        show this help message and exit
    --skip            skip startup animation
    --volume=<int>    global volume value [0-15]
    --cli             console only output
    --fullscreen      enable fullscreen mode
    --vsync           enable VSYNC (SDL builds)
    --soft            use software rendering (SDL builds)
    --fs=<str>        path to the file system folder
    --scale=<int>     main window scale
    --cmd=<str>       run commands in the console
    --keepcmd         re-execute commands on every run
    --version         print program version
    --crt             enable CRT monitor effect
  • --cli Disables the TIC-80 window. That can be useful for automating various import/export for example.

  • --vsync Vsync aligns your game's graphics with your screen's refresh rate, preventing tearing and flickering. With Vsync on, your game waits for the screen to start refreshing, then displays a complete frame, ensuring smoother visuals. The default sokol desktop builds always use vsync, so the flag exists only in the SDL builds.

  • --soft Use the SDL software renderer instead of the SDL GPU renderer, which may be more stable but does not allow to use CRT effect. Linked to issue #1566. The default sokol builds have no software renderer, so the flag exists only in the SDL builds.

  • --crt Turns on the CRT (cathode-Ray Tube) filter for a retro look. Note: The CRT filter does not show on the TIC-80 screen capture GIFs. Also it does not work when --soft argument is used.

Editor and developer builds add two more groups:

Byte battle options:
    --codeexport=<str>   export code to filename
    --codeimport=<str>   import code from filename
    --delay=<int>        codeexport / codeimport update interval in ticks
    --lowerlimit=<int>   lower limit for code size (256 by default)
    --upperlimit=<int>   upper limit for code size (512 by default)
    --battletime=<int>   battletime in minutes

FFT options:
    --fft                enable FFT support
    --fftlist            list FFT devices
    --fftcaptureplaybackdevices  Capture playback devices for loopback (Windows only)
    --fftdevice=<str>    name of the device to use with FFT

See FFT for the audio analysis API these options feed.

Examples

tic80 --skip --fs .                                           skip startup animation and use current directory as storage
tic80 --skip --cmd "load cart.tic"                            skip startup animation and load `cart.tic` cart
tic80 --cmd surf                                              start TIC-80 in SURF mode
tic80 --cmd "load cart.tic & export html game.zip & exit"     load `cart.tic` cart, export html `game.zip` and exit
tic80 --cmd "load cart.tic & save cart.lua & exit"            load `cart.tic`, save as a text cart and exit
tic80 --cmd "load cart.tic & export sprites spr.gif & exit"   load `cart.tic`, export sprites to `spr.gif` and exit
tic80 --cmd "load cart.tic & export music music.wav id=5 & exit"  load `cart.tic`, export 5th track to `music.wav` and exit
tic80 ../path/to/cart.tic --fs ../path/to                     use `../path/to/` as storage and load `cart.tic`
tic80 > log.txt                                               all trace output is redirected to the named file
tic80 | Out-File log.txt                                      same as above for PowerShell users

You can also run console commands by passing them in from the command line. Commands consisting of more than one word should be enclosed in quotes, for example:

tic80 path/to/cart.tic "export html"
⚠️ **GitHub.com Fallback** ⚠️