Page 1 of 2
What is LUBE?
Posted: Sat Dec 18, 2010 8:38 pm
by Socks
Could you explain how I use it in simple n00b terms?
Re: What is LUBE?
Posted: Sat Dec 18, 2010 9:08 pm
by Ryne
Socks wrote:Could you explain how I use it in simple n00b terms?
You say "could YOU explain" as if the love forums were a person. LUBE is a networking library, and using it isn't as easy as someone just saying "type this". It might be a little advanced for a "n00b", though I've never used it myself, so I may be wrong.
Re: What is LUBE?
Posted: Sat Dec 18, 2010 9:35 pm
by Socks
Ryne wrote:Socks wrote:Could you explain how I use it in simple n00b terms?
You say "could YOU explain" as if the love forums were a person. LUBE is a networking library, and using it isn't as easy as someone just saying "type this". It might be a little advanced for a "n00b", though I've never used it myself, so I may be wrong.
I meant you as in the person reading the topic.
I've thrown bits of code together from reading the wiki (some articles are weirdly out of place) and the source files.
Re: What is LUBE?
Posted: Sat Dec 18, 2010 9:53 pm
by bartbes
TechnoCat compiled a list of useful resources, and posted that in the lube thread, in
this post, to be exact.
Re: What is LUBE?
Posted: Sat Dec 18, 2010 10:07 pm
by Socks
bartbes wrote:TechnoCat compiled a list of useful resources, and posted that in the lube thread, in
this post, to be exact.
I just tried
Code: Select all
require "LUBE"
output = {}
function onConnect(ip, port)
output[#output+1] = "Connection from "..ip
end
function onReceive(data, ip, port)
output[#output+1] = "Data from "..ip
output[#output+1] = data
end
function onDisconnect(ip, port)
output[#output+1] = "Disconnect from "..ip
end
server = lube.server(18025)
server:setCallback(onReceive, onConnect, onDisconnect)
server:setHandshake("Hi!")
function love.update(dt)
server:update(dt)
end
function love.graphics()
love.graphics.print(table.concat(output,"\n"),0,0)
end
To test, but the window closes when loaded.
Re: What is LUBE?
Posted: Sat Dec 18, 2010 10:08 pm
by bartbes
Probably a combination of you creating a function love.graphics, where you mean love.draw, but instead overwrite love's graphics API, and a bug which causes errors not to display on windows >=vista.
Re: What is LUBE?
Posted: Sat Dec 18, 2010 11:22 pm
by Socks
Ok, so now that everything's working pretty well, I have to ask if I need to port forward for other's clients to connect to my server.
Re: What is LUBE?
Posted: Sat Dec 18, 2010 11:25 pm
by bartbes
You do, unless you do some black magic.
Re: What is LUBE?
Posted: Sat Dec 18, 2010 11:42 pm
by Socks
bartbes wrote:black magic.
Now, see, here's my one problem.
Me and a few of my (smarter) friends tried setting up a server for Minecraft on my computer. My router is locked, and although we tried dozens of passwords, we had no luck in unlocking. I'm planning to maybe just reset the entire thing (Can't you just unplug it for a few minutes, then turn it back on? I believe this works), but if there is some magics to allow me to alow server-client communication without port forwarding, then I would be very happy.
Re: What is LUBE?
Posted: Sat Dec 18, 2010 11:55 pm
by bartbes
Well, you could look into bypassing it, but in most cases requires work from the client, server and a 3rd party publicly available server, which is.. cumbersome in your case. Your best bet would be UPNP, but implementing it will suck, maybe you could try setting up something like a vpn (for example hamachi), or maybe ssh port forwarding?
Generally though, it's best if you can control your router
.