
mid : Returns the max, min or middle number e.g. max : Returns the highest of the two values. min : Returns the lowest of the two values. atan2 : Converts dx,dy to an angle in the range 0-1. mset : Sets the map value of the given cell. mget : Gets the map value of the given cell. map : Draw the selection of map cells at the given screen position. dkey : (String) character returned by keyboard. dkeyp : (Boolean) True when a key pressed. dinput : Enable pico8 devkit input for mouse and keyboard input. btnp : Get 'repeating' button state for given player (see pconsts for constants). btn : Get button state for given player (see pconsts for constants). fillp : Set fill pattern for circ, circfill, rect, rectfill, pset, and line (see ). sspr : Draw sprite sheet texture at given coords. spr : Full draw sprite at given coords with given size and flip flags. sset : Sets the spritesheet value of the pixel at the given coords. sget : Get the spritesheet value of the pixel at the given coords. print : Prints the string in the given colour at the given coords. pset : Sets the value of the pixel at the given coords. pget : Get the value of the pixel at the given coords. palt : Sets transparency on given colour to on or off. pal : Switch colour 0 to colour 1, set palette to 0 for draw palette (sprites etc.), or 1 for screen (fades etc.). cursor : Set the cursor position and carriage return margin. color : Sets the default drawing colour. cls : Clear the screen with the given colour. yield : Pause execution from within a coroutine. costatus : Get the status of a coroutine, either 'running', 'suspended', or 'dead'. coresume : Resume a created coroutine, passing optional additional parameters in first time. cocreate : Create a coroutine that executes the function. dset : Store value at index (call cartdata first). dget : Get number stored at index (call cartdata first). cartdata : Open cart data (once per exection). Wherever Pico-8 has an API where there are a "common" set of parameters, and less used optional ones, the snippet for the optional parameters includes the comma, so they can be quickly deleted if not needed, but you will need to type the comma if you want to use them.
Launching Pico-8 to open or run a cartridge from within VSCode. Helpful "enumerations" for input and colours.
Additional Pico-8 helper snippets such as:. Pico-8 API snippets for the (hopefully) whole Pico-8 API.
Basic LUA language snippets for loops etc.Enables LUA syntax highlighting (based off the latest base LUA language plugin).This plugin provides facilities for editing Pico-8 p8 files in VSCode.Ĭurrently the plugin provides the following features: