Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing on Game Development and University

Brandon Blanker Lim-it flamendless

🎯
Focusing on Game Development and University
View GitHub Profile
@1bardesign
1bardesign / dialogue.lua
Created Jun 12, 2019
example dialogue system for love2d based on coroutines - runnable love file prepared here: https://www.dropbox.com/s/0n6vs634jzlk266/dialogue_co.love
View dialogue.lua
--dialogue type
local dialogue = {}
dialogue._mt = {
__index = dialogue,
}
function dialogue:new(f)
return setmetatable({
View tokenizer.lua
-- these have to be sorted by longest first
local keywords = {
"function",
"then",
"end",
"if",
}
local symbols = {
@ruccho
ruccho / Generate Normal Map.lua
Created Mar 7, 2019
Lua script for Aseprite that generates normal map automatically.
View Generate Normal Map.lua
----------------------------------------------------------------------
-- Generate Normal Map
--
-- It works only for RGB color mode.
----------------------------------------------------------------------
if app.apiVersion < 1 then
return app.alert("This script requires Aseprite v1.2.10-beta3")
end
View main.lua
--[[
example use
]]
local recolour = require("recolour")
--we want to recolour this asset image
local to_recolour = love.image.newImageData("path/to/image.png")
--using this palette image
local palette = love.image.newImageData("path/to/palette.png")
@rm-code
rm-code / ProFi.lua
Last active Feb 5, 2020 — forked from perky/ProFi.lua
Forked from (https://gist.github.com/perky/2838755) || ProFi, a simple lua profiler that works with LuaJIT and prints a pretty report file in columns.
View ProFi.lua
--[[
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php.
Updated to v1.4 by Robert Machmer 2017
Example:
ProFi = require 'ProFi'
ProFi:start()
some_function()
another_function()
coroutine.resume( some_coroutine )