And this is where my request comes in. I don't really have much time to work on extending STI, nor do I have extensive knowledge of other libraries that STI should interface with. If anyone out there has used STI, knows how it works, and would like to help extend it, I am looking for, at minimum, the following plugins:
- bump.lua interface - DONE!
- HC interface
- Light World interface
- Convert Tile Collections to a Tile Atlas
Creating a plugin for STI is pretty simple. You just need to return a table with functions and/or properties, preferably namespaced, and you're done! Functions need to have the map as the first argument!
I'm not going to be too picky about code style, but if you want to match STI's style, I use tabs to indent, and spaces to align. I also like to align = signs in code blocks. See below for an example of how I would write a plugin.
Code: Select all
--- Bump plugin for STI
-- @module bump
-- @author Someone Cool
-- @copyright 2015
-- @license MIT/X11
return {
bump_LICENSE = "MIT/X11",
bump_URL = "https://github.com/someonecool/bump_sti_plugin",
bump_VERSION = "3.1.5.0", -- semantic versioning, this implies that it should work with bump 3.1.5 and has not yet been revised.
bump_DESCRIPTION = "Box2D hooks for STI.",
bump_init = function(map, arg1, arg2)
-- some init code!
end,
bump_draw = function(map)
-- draw code!
end
}