The _init() function is called by Pico-8 to initialize a cartridge.

You define this function in your game's source code. It takes no arguments.

Pico-8 calls this function after evaluating all of the source code. In typical usage, a cartridge's source code includes definitions for functions and variables, an _init() function, and _update() and _draw() functions for the game loop. Pico-8 calls _init() once before starting the game loop.

If any code outside of functions has side effects, these effects occur before _init() is called. (This is trivial if the code consists only of function and global variable definitions.)

Examples Edit

See also Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.