LUBE (Networking Library)

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Sparx
Party member
Posts: 125
Joined: Thu Apr 02, 2009 9:54 am
Location: Aachen, Germany

Re: LUBE (Networking Library) v0.6 + LUBE-X v0.02

Post by Sparx »

Seems solved.. if you have too much time or don't know what to do a simple broadcast would be nice in LUBE just for the completeness of it.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02

Post by bartbes »

New version, small change, added a check if a client exists, before attempting to send data (and failing).

EDIT: Moved the file back to the first post.
Magitek
Prole
Posts: 48
Joined: Sun Dec 13, 2009 2:23 am

Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02

Post by Magitek »

This has been most useful thanks, however I can't seem to get TCP to actually transmit anything.
Do I need to be doing more than just changing init to ("tcp")?

edit: It took longer than I liked but I found acceptall() was necessary in the server loop
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02

Post by bartbes »

I would've replied earlier if I knew those things and didn't have to look them up, well I'm glad you found it, and hope you will find some good use for LUBE.
stampede
Prole
Posts: 21
Joined: Fri Oct 23, 2009 8:22 am
Location: Finland
Contact:

Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02

Post by stampede »

So LUBE is ready for tcp and udp?

Just thinking about online game (not yet planning to actually write it), but I need tcp for it!

EDIT: Read through the LUBE.lua, and looks really sweet. It's a lot better to have all things in one file, than client.lua and server.lua. Makes things simpler. This doesn't need any additional .dll provided with the final game .exe? Or am I wrong?

Seems to be fairly simple to use all these. Have to try to do somekind of demo so I can see if it's really that simple :D

EDIT2:
Forgot to ask; is this written for löve 0.6, or 0.5? Not sure if LUBE version number goes with the Löve version number.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02

Post by bartbes »

It has tcp, it is lua only, so doesn't need an extra dll, and is written for 0.5.0, however, because I don't actually use love itself (IIRC) you should be able to run it on 0.6.0 without any problems.
stampede
Prole
Posts: 21
Joined: Fri Oct 23, 2009 8:22 am
Location: Finland
Contact:

Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02

Post by stampede »

Oh, I read that it has a bug or something that prevents the system to have more than one client per IP. What does this mean and is that information old? Does this mean that I can't have more than one client connecting to the server using LUBE?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02

Post by bartbes »

You can, the clients can't have the same IP (yet), good thing you reminded me, I might look into it tomorrow.
stampede
Prole
Posts: 21
Joined: Fri Oct 23, 2009 8:22 am
Location: Finland
Contact:

Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02

Post by stampede »

Ah, so it handles all the data coming from one ip as a one client? Which means if you play with your friends in lan on a outside server, it handles all players as one client?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LUBE (Networking Library) v0.6.1 + LUBE-X v0.02

Post by bartbes »

Yes, but it will handle the connect/disconnect messages the same way, so for an even number of clients the server acts as if there is nobody connected.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests