What is LUBE?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Socks
Prole
Posts: 14
Joined: Sat Dec 04, 2010 2:12 am

What is LUBE?

Post by Socks »

Could you explain how I use it in simple n00b terms?
:p
User avatar
Ryne
Party member
Posts: 444
Joined: Fri Jan 29, 2010 11:10 am

Re: What is LUBE?

Post 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.
@rynesaur
Socks
Prole
Posts: 14
Joined: Sat Dec 04, 2010 2:12 am

Re: What is LUBE?

Post 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.
:p
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: What is LUBE?

Post by bartbes »

TechnoCat compiled a list of useful resources, and posted that in the lube thread, in this post, to be exact.
Socks
Prole
Posts: 14
Joined: Sat Dec 04, 2010 2:12 am

Re: What is LUBE?

Post 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.
:p
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: What is LUBE?

Post 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.
Socks
Prole
Posts: 14
Joined: Sat Dec 04, 2010 2:12 am

Re: What is LUBE?

Post 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.
:p
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: What is LUBE?

Post by bartbes »

You do, unless you do some black magic.
Socks
Prole
Posts: 14
Joined: Sat Dec 04, 2010 2:12 am

Re: What is LUBE?

Post 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.
:p
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: What is LUBE?

Post 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 :3.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot] and 2 guests