I've been trying to set up LUBE (versions 1.0 and the current dev version) with no luck - my attempts have been as follows:
This is the main.lua of my test game, which fails (attempt to call field 'udpClient' (a nil value))
Code: Select all
local Vector = require "hump.vector"
local Class = require "hump.class"
require "LUBE" -- for the intertubes
require "player"
universe = {}
p = LocalPlayer(Vector(200, 200))
local client
function love.load()
love.graphics.setBackgroundColor(33, 89, 125)
cfg = love.filesystem.read("userconfig.cfg")
ip, port = cfg:match("^(.+):(%d+)$")
assert(ip and port)
client = lube.udpClient()
client.callbacks.recv = onReceive
p:load()
end
function love.update(dt)
p:update(dt)
p:integrate(dt)
end
function love.draw()
p:draw()
end
function onReceive(data)
print(data)
end
This fails with the same error, attempt to call field 'udpClient' (a nil value)
Code: Select all
local Class = require "hump.class"
require "LUBE"
local user = lube.udpClient()
Code: Select all
local Class = require "hump.class"
require "LUBE"
for k,v in pairs(lube) do
print(k,v)
end
EDIT
Turns out the changes made to HUMP.class 5 days ago (https://github.com/vrld/hump/commit/9f6 ... ac7c3ed130) made it incompatible with LUBE, and that was what was causing all these issues!