-
In a nutshell, you will have a single .lua TIC-80 cartridge where you include the external files with require "relative/path/to/file"
- You can also require files in required files, but I like to keep all requires in the main cartridge.
-
For example, you could have main.lua as your main cartridge, and in the same folder, a libraries folder with files math.lua and table.lua inside.
-
Inside main.lua, you'd call the libraries with
require "libraries/math"
require "libraries/table"
-
And that's it! After the required lines, every global variable and function in those libraries is at your disposal.