Page 7 of 34

Re: LUBE (Networking Library) v0.01.1

Posted: Fri Dec 19, 2008 4:42 pm
by bartbes
I'm seeing HUGE download counts of.. 3?!
Are there only 3 users, or does the rest use older versions?

So, I'll ask for feedback once more:
[obsessed]If you miss anything just post
If you use the lib, please post
If you have any comment whatsoever, POST!
[/obsessed]

Re: LUBE (Networking Library) v0.01.1

Posted: Fri Dec 19, 2008 5:00 pm
by Ripe
I used it to create client/server! I did modify your code a little bit so I could run more than 1 client with same IP. I've just been playing around with this thing I picked up from using torque game engine. I created a function called commandToServer on client side and commandToClient on server side, I think it's actually an easy way to send packets and makes it easy to expand. The example just show players moving around. Beware! The movement isn't 100% sync'd, once I move it to grid based movement, that will make it more accurate.

EDIT: Oh and players aren't removed if they leave, I'll wait till love get an exit event :D

Re: LUBE (Networking Library) v0.01.1

Posted: Fri Dec 19, 2008 6:15 pm
by bartbes
Ripe wrote:EDIT: Oh and players aren't removed if they leave, I'll wait till love get an exit event :D
I couldn't help but notice that you've removed every thing that helps with disconnection.
You can already implement something to temporarily fill the void of the exit event:
Just put the disconnection callback etc back in, and already do a 'clean' disconnect when using a key to close the game.
This makes it easier to implement the exit event when it is implemented.

OR you could use the old game of ping-pong.
FEATURE REQUEST (wait? I'm requesting myself to do something?): Create a ping system.

ACTION TAKEN: Added poll

EDIT: No removed it again, somehow the forum kept putting in answers from the previous poll.

Re: LUBE (Networking Library) v0.01.1

Posted: Fri Dec 19, 2008 6:55 pm
by Tabasco
I intend to tinker around with it for a sort of server browser and I also want to try some UDP NAT traversal techniques with it once I get time.
For a feature request, I'd definitely like to index clients by something more unique than the IP.

Thanks!

Re: LUBE (Networking Library) v0.01.1

Posted: Sat Dec 20, 2008 1:22 am
by Ripe
The reason I removed the disconnect callback is because it was only running if a person with the same IP was already logged on. Also returning a failed sendto doesn't seem to give a different result to when it succeeds.

Re: LUBE (Networking Library) v0.01.1

Posted: Sat Dec 20, 2008 11:41 am
by bartbes
I'll start working on the ping system.

@Ripe: Failed sendto? Well, it indeed doesn't fail when there is nothing on the receiving end.
LuaSocket Docs wrote:Note: In UDP, the send method never blocks and the only way it can fail is if the underlying transport layer refuses to send a message to the specified address (i.e. no interface accepts the address).
However I was refering to using the shutdown method, as it sends a closing handshake, which would then tell the server the client disconnected. Second of all, using ports to index client may cause unexpected behaviour. What about 2 clients with the same port? As those are mostly chosen random, you don't know when a problem will occur, just that it will occur. Looking at your code, it currently doesn't cause any real problems, as the only thing happening now is that the first client is locked out.
BTW I do have to mention that when the server closes/crashes it's nice to see the clients just stop instead of crashing.

@Tabasco: I'll check the lua docs once again, but to do that there has to be a fast way to get info from a table, the fastest way for now is already having an index.
Though if you know some other way, just tell me.

Re: LUBE (Networking Library) v0.01.1

Posted: Sat Dec 20, 2008 12:04 pm
by bartbes
OK.. finished, however before releasing it I want the release to be tested, so:
Request for beta testers
PM if you want to sign up


On a second note, I've come up with an idea for the Clients table: (pseudo-code)

Code: Select all

Clients[id] = connected
id = ip .. "/" .. port     --> example: "127.0.0.1/2345"
connected = true/false     --> meaning: if connected
And I need beta testers for that too, so:
Sign up for beta testing

Re: LUBE (Networking Library) v0.01.1

Posted: Sun Dec 21, 2008 12:42 pm
by bartbes
Minor update 0.01.2:
  • Fixed an error on line 101 of Server.lua
0.01.2 doesn't include the ping system, or the revised Clients table, beta testers are still required for that.
NOTE: beta testers would have made this update unnecessary as the error would have been found before release.

Ping system and revised Clients table are planned for 0.02

Re: LUBE (Networking Library) v0.01.2

Posted: Mon Dec 22, 2008 11:53 am
by bartbes
Just to make sure you all know how much reactions I've got so far:

22 December: 0 :cry:

I hope this is just because everybody is doing other stuff right now.

Re: LUBE (Networking Library) v0.01.2

Posted: Mon Dec 22, 2008 12:36 pm
by mikembley
Im on this soon, I would like to LUBE my LÖVE and see what it can offer me :) Haha

Have you made any demos or anything with it?