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]
LUBE (Networking Library)
Re: LUBE (Networking Library) v0.01.1
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
EDIT: Oh and players aren't removed if they leave, I'll wait till love get an exit event
- Attachments
-
- server.zip
- (4.56 KiB) Downloaded 235 times
-
- client.zip
- (4.57 KiB) Downloaded 234 times
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library) v0.01.1
I couldn't help but notice that you've removed every thing that helps with disconnection.Ripe wrote:EDIT: Oh and players aren't removed if they leave, I'll wait till love get an exit event
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
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!
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
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.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library) v0.01.1
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.
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.
@Ripe: Failed sendto? Well, it indeed doesn't fail when there is nothing on the receiving end.
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.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).
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.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library) v0.01.1
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)
And I need beta testers for that too, so:
Sign up for beta testing
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
Sign up for beta testing
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library) v0.01.1
Minor update 0.01.2:
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
- Fixed an error on line 101 of Server.lua
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
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LUBE (Networking Library) v0.01.2
Just to make sure you all know how much reactions I've got so far:
22 December: 0
I hope this is just because everybody is doing other stuff right now.
22 December: 0
I hope this is just because everybody is doing other stuff right now.
Re: LUBE (Networking Library) v0.01.2
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?
Have you made any demos or anything with it?
Who is online
Users browsing this forum: Google [Bot] and 5 guests