Skip to main content

Using Libraries

There's a set of libraries shipped with LIKO-12 to be available for all games that request them.

lume​

Lua functions geared towards game-dev.

local lume = Library('lume');

middleclass​

A simple OOP library for Lua. It has inheritance, metamethods (operators), class variables and weak mixin support.

local middleclass = Library('middleclass');

bump​

Lua collision-detection library for axis-aligned rectangles.

local bump = Library('bump');

JSON​

A simple library for serializing and deserializing data from/to JSON.

local JSON = Library('JSON');

local lua_value = JSON:decode(raw_json_text);

local raw_json_text = JSON:encode(lua_table_or_value);
local pretty_json_text = JSON:encode_pretty(lua_table_or_value);

vector​

A handy 2D vector class providing most of the things you do with vectors.

local vector = Library('vector');

spritesheet​

local SpriteSheet = Library('spritesheet');

Absolute Libraries​

danger

Those libraries are absolute, deprecated and most likely will be removed in a future version.

likocam​

A port of a PICO-8 library called picocam.

Check the cube demo for an example.

local likocam = Library('likocam');

luann​

Unknown Lua implementation of artificial neural-networks.

geneticAlgo​

Unknown Lua implementation of the genetic algorithm.