DMC Lua Library

The DMC Lua Library is a collection of classes and utilities that I have created while developing apps using Corona SDK.

Download

The library can be freely downloaded from github.com, just click on the image below.

github

Library Modules

lua-bit-shim

lua-bit-shim is a module used to load a bit op functionality from various sources, but standardize the name to bit so that code is portable across platforms.

lua-bytearray

A byte array is a useful item when dealing with streams of data, like when working with network protocols.

lua-e4x

lua-e4x is a Lua implementation of E4X (ECMAScript for XML) which is a extremely easy way to navigate XML documents. lua-e4x is modeled after the E4X implementation from Adobe.

lua-error

lua-error is a module which handles raising and capturing custom errors via try/catch/finally syntax. It is somewhat modeled after the Python implementation.

lua-events-mixin

lua-events-mixin is a module which adds event functionality to any object, eg addEventListener(), removeEventListener(), displatchEvent().

lua-files

lua-files is a module which easily reads and writes JSON, text and Binary files, plus reads config file formats.

lua-json-shim

lua-json-shim is a module used to load any of the various Lua json modules, but standardize the name to json so that code is portable across platforms.

lua-megaphone

lua-megaphone is a module which provides inter-app communication, for mobile/server etc.

lua-objects

lua-objects is an advanced object oriented module for Lua (OOP).

lua-patch

lua-patch is a module which adds additional functionality to Lua, like adding methods to table, eg table.pop.

lua-promise

lua-promise is a module which implements the Promise / Deferred design patter.

lua-states-mixin

lua-states-mixin is a module which implements the State Machine design pattern. The module can either be applied through OO inheritance or by "monkey-patching" an object.

lua-utils

lua-utils is a collection of useful Lua functions.