Fantasy computer for making, playing and sharing tiny games. · By Nesbox
For example, Pico-8 there are several methods: _draw (), _init (), _update (), _update60 ()
It may be worth adding method INIT?
I do in this way:
t=0function INIT() trace(''..t) t=t+1end
INIT()
function TIC() trace(''..t)end
note that INIT can have the name you prefer.
sorry, didn't see that you already answered :)
Luckily we said the same thing :D
(but you formatted it better)
Thanks for the help!
If you want INIT func, just declare and call it before TIC function.
function init() t=0 end init() function TIC() cls(12) print("HELLO WORLD!",84,64) t=t+1 end
I designed the app to use with only one TIC function which calls 60 times per second.
That is, any methods that are declared and call before TIC function will work. Understood thanks!
Sorry for offtopic, but how you are can format the code? It may have some tag for formatting LUA code?
just go to 'Formatting' and select 'Code' on the toolbar
Thanks!