Home
DuckAfire edited this page Jan 21, 2024
·
9 revisions
This is a "Libraries Collection" created to facilitate the creation of games (cartridges) for the fantasy computer/console Tic80. Through the use of sets of simple functions (library). All the libraries of this collection have two variants, they are it: Compacted and Not Compacted.
The easiest way to use libraries inside Tic80 is by copying and pasting them to your cartridge, because this method works in all cartridge formats (.tic
, .exe
, ...).
But this method may not work if the libraries are not structured for use like this.
Conventional structure (!lua)
local lib = {}
local function msg( txt )
print( txt )
end
lib.msg = msg
return lib
local LIB = {}
do
local function msg( txt )
print( txt )
end
LIB.msg = msg
end
local lib = LIB
local LIB={}
do LIB.msg=function(t) print(t) end end
local lib=LIB