Skip to content

Instantly share code, notes, and snippets.

-- The MovingPlatform node facilitates platforms that move back and fourth along a Bspline Curve
-- So setup a movingplatform, you will need to create 2 objects:
-- The 'control' object represents the size of the ledge and contains all of the properties required to make it work
-- The 'line' object is a polyline that represents the path that the platform will follow
-- 'control' object:
-- Must be setup in the 'nodes' object layer
-- Required:
-- 'line' ( string ) - the name of the polyline that defines the path
local Gamestate = require 'vendor/gamestate'
local Prompt = require 'prompt'
local Timer = require 'vendor/timer'
local hiddendoortrigger = {}
hiddendoortrigger.__index = hiddendoortrigger
-- Nodes with 'isInteractive' are nodes which the player can interact with, but not pick up in any way
hiddendoortrigger.isInteractive = true
function hiddendoortrigger.new(node, collider)
local Timer = require 'vendor/timer'
local sound = require 'vendor/TEsound'
return{
name = 'jellyfish-blueberry',
die_sound = 'acorn_crush',
position_offset = { x = 0, y = 0 },
height = 48,
width = 48,
bb_width = 48,
-- inculdes
local sound = require 'vendor/TEsound'
local Timer = require 'vendor/timer'
local tween = require 'vendor/tween'
local function dance(npc, level, time)
npc.state = "dancing"
npc.busy = true
Timer.add(time, function()
npc.state = "default"
-- inculdes
return {
width = 32,
height = 25,
animations = {
default = {
'loop',{'1-2,1'},.5,
},
walking = {
local Timer = require 'vendor/timer'
local anim8 = require 'vendor/anim8'
local sound = require 'vendor/TEsound'
local Wall = {}
Wall.__index = Wall
local crack = love.graphics.newImage('images/blocks/crack.png')
function Wall.new(node, collider)
local wall = {}
-- inculdes
local sound = require 'vendor/TEsound'
local Timer = require('vendor/timer')
local tween = require 'vendor/tween'
local character = require 'character'
local gamestate = require 'vendor/gamestate'
local utils = require 'utils'
require 'utils'
local anim8 = require 'vendor/anim8'
local Dialog = require 'dialog'
function love.load()
joystick = love.joystick.getJoysticks()[1]
position = {x = 400, y = 300}
speed = 300
end
function love.draw()
local joysticks = love.joystick.getJoysticks()
for i, joystick in ipairs(joysticks) do
love.graphics.print(joystick:getName(), 10, i * 20)
local anim8 = require 'vendor/anim8'
local app = require 'app'
local Dialog = require 'dialog'
local window = require "window"
local sound = require 'vendor/TEsound'
local fonts = require 'fonts'
local utils = require 'utils'
local Timer = require 'vendor/timer'
local Menu = {}
@8bitgentleman
8bitgentleman / gist:b638d448789c42e64790
Last active August 29, 2015 14:05
hide npc items based on affection
--this is an example of what talk_items could look like in the npc's file
{ ['text']='test', affectionMin=200, affectionMax=400 },
--in iventory before you load the table of commands run function commandUpdate() to add/remove based on affection level
update = function(dt, npc, player)
local talkTable = (talk_items or {}) --self.commands[item.text]
local affection = player.affection.hilda or 0