I have been trying to figure this out for the past 2 day pls help ;(
Posted: Tue Dec 24, 2019 11:13 pm
Okay so I'm bugged, I don't know which library to use for the multiplayer. Is it socket or enet?
I have created a "ping/pong" program that constantly sends "ping" to a server and "pong" to a client both in socket and enet.
Now the problem is that when I start 10 clients the socket one starts getting really slow(only 2 of 10 clients receive "pong" and the other 8 don't receive anything), but with enet every 10 clients receive "pong".
But the thing that bugs me is that enet one, needs to receive every time a packet otherwise the client disconnects(it uses the "while event do" loop) is there any possible way to fix that, I don't want to send every time a packet, I want to send them in delays(1 second...) but if I do it the server doesn't receive anything and stops sending the client packets.
The code I used for the enet is: https://love2d.org/wiki/lua-enet
So to wrap things up, which library is better for multiplayer games socket or enet?
And is it possible to send a delayed packet using enet without stopping the while event do loop? Could you provide code?
...I have been trying to figure this thing out for the past 2 days so I decided to jump on forums(I googled it everywhere, didn't help)...
I have created a "ping/pong" program that constantly sends "ping" to a server and "pong" to a client both in socket and enet.
Now the problem is that when I start 10 clients the socket one starts getting really slow(only 2 of 10 clients receive "pong" and the other 8 don't receive anything), but with enet every 10 clients receive "pong".
But the thing that bugs me is that enet one, needs to receive every time a packet otherwise the client disconnects(it uses the "while event do" loop) is there any possible way to fix that, I don't want to send every time a packet, I want to send them in delays(1 second...) but if I do it the server doesn't receive anything and stops sending the client packets.
The code I used for the enet is: https://love2d.org/wiki/lua-enet
So to wrap things up, which library is better for multiplayer games socket or enet?
And is it possible to send a delayed packet using enet without stopping the while event do loop? Could you provide code?
...I have been trying to figure this thing out for the past 2 days so I decided to jump on forums(I googled it everywhere, didn't help)...