Page 2 of 9

Re: sock.lua - A simple networking library for LÖVE

Posted: Wed Aug 17, 2016 8:30 am
by Ikroth
Sulunia wrote:So, i just took this awesome library out for a spin.
One thing that i didn't know and took me some time to figure out: the server always receives an event, the data AND the peer that sent it.
So, if you want to send information specifically to a peer, you must use the peer the server receives on event trigger. It is pretty damn obvious now, but complete beginners to networking may have troubles.

I'll see if i can fix the ugly code around my simple "box moving" example with this lib and then share it here if people so wish.

Other than that, i suppose all "security" checks are done by the lib already no? So we only have to determine if the data received is valid or not to prevent cheating and so on...

Not sure if i was clear, say so if not. Otherwise, amazing library! Will definitely use it.
Hi, thanks for your input. I think some of these issues, like figuring out what parameters a callback takes, would be more clear if I wrote a tutorial. I just haven't gotten to it because I'm lazy.

As far as security goes, there isn't too much going on there. It is still up to you to decide if the sent information is valid. However, I wouldn't mind adding a feature to check if an event is valid, but I'm not sure of a method that would be useful to everyone.

My advice would be to accept as little information from the client as possible, and when you do, check it. If you do accept information without checking, make sure it is something that doesn't matter. Ideally, the server should be authoritative in all matters.

Re: sock.lua - A simple networking library for LÖVE

Posted: Thu Oct 06, 2016 5:50 pm
by Manyrio
Hey,
I'm creating a multiplayer game, I finished it and it's all fine in localhost. But when I want to play with my friends, we try with hamachi and it just doesn't works ...
It give me this error when I start the server :
"Failed to create the host. Is there another server running on :1234?"
I tried with a lot of port but it still doesn't works.
Help plz

Re: sock.lua - A simple networking library for LÖVE

Posted: Fri Oct 07, 2016 2:07 pm
by Ikroth
Manyrio wrote:Hey,
I'm creating a multiplayer game, I finished it and it's all fine in localhost. But when I want to play with my friends, we try with hamachi and it just doesn't works ...
It give me this error when I start the server :
"Failed to create the host. Is there another server running on :1234?"
I tried with a lot of port but it still doesn't works.
Help plz
That error can mean almost anything. Make sure there's nothing else running on port 1234, or try a different port. Otherwise, your network is misconfigured in some way that enet can't create a host. Perhaps try port forwarding on your router instead of using Hamachi.

Re: sock.lua - A simple networking library for LÖVE

Posted: Sun Dec 04, 2016 9:21 am
by LordSeaworth
Is the library still active? Is it working on latest love?
Sorry to ask. Just wondering since i would love to use this library

Re: sock.lua - A simple networking library for LÖVE

Posted: Sun Dec 04, 2016 9:35 am
by 4aiman
LordSeaworth wrote:Just wondering since i would love to use this library
Nothing is dead while someone utilizes it's powers.
So, *do* use the library :)
Maybe you're the one who will lead the development in case the author won't :)
You know, it's not a requirement to be able to code anything to be a good leader :)

Re: sock.lua - A simple networking library for LÖVE

Posted: Sun Dec 04, 2016 9:54 am
by Sir_Silver
I actually just started using Ikroth's sock library and am thoroughly enjoying how easy it is making networking for me. Using the latest version of love too!

Re: sock.lua - A simple networking library for LÖVE

Posted: Sun Dec 04, 2016 10:37 am
by LordSeaworth
4aiman wrote:
LordSeaworth wrote:Just wondering since i would love to use this library
Nothing is dead while someone utilizes it's powers.
So, *do* use the library :)
Maybe you're the one who will lead the development in case the author won't :)
You know, it's not a requirement to be able to code anything to be a good leader :)
Thanks for replying. and maybe yeah.
Who knows.
Sir_Silver wrote:I actually just started using Ikroth's sock library and am thoroughly enjoying how easy it is making networking for me. Using the latest version of love too!
Good to hear other people still use it in current projects!

Thanks both for the reply

Re: sock.lua - A simple networking library for LÖVE

Posted: Sun Dec 04, 2016 8:46 pm
by Ikroth
This library is not dead, but it has been a while since I pushed any updates to the master branch. There is a WIP update that adds custom serialization support that is in the "serialization" branch. There may also need to be some naming changes in the next version ("send" or "emit"?).

As far as I know, this will work in the latest version of LÖVE. It doesn't actually depend on LÖVE, it is a pure lua library that depends on enet (and bitser, although I'm trying to change this with custom serialization).

Re: sock.lua - A simple networking library for LÖVE

Posted: Mon Dec 05, 2016 1:28 am
by LordSeaworth
Ikroth wrote:This library is not dead, but it has been a while since I pushed any updates to the master branch. There is a WIP update that adds custom serialization support that is in the "serialization" branch. There may also need to be some naming changes in the next version ("send" or "emit"?).

As far as I know, this will work in the latest version of LÖVE. It doesn't actually depend on LÖVE, it is a pure lua library that depends on enet (and bitser, although I'm trying to change this with custom serialization).
Good to hear that.
The library will be a valueable asset to my project.
So already a thanks for the work!

Re: sock.lua - A simple networking library for LÖVE

Posted: Sat Dec 17, 2016 10:16 pm
by Ikroth
I just updated the library to version 0.2.0. It adds custom serialization support and changes "emit" functions to "send". I also updated the documentation styles.

You can check out the changes here https://github.com/camchenry/sock.lua/wiki#020.